Message ID | 20201113105952.11638-22-songmuchun@bytedance.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=2mdj=ET=kvack.org=owner-linux-mm@kernel.org> Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0BD0C138B for <patchwork-linux-mm@patchwork.kernel.org>; Fri, 13 Nov 2020 11:05:00 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BEA6B207DE for <patchwork-linux-mm@patchwork.kernel.org>; Fri, 13 Nov 2020 11:04:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=bytedance-com.20150623.gappssmtp.com header.i=@bytedance-com.20150623.gappssmtp.com header.b="AS+sztqa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BEA6B207DE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=bytedance.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E96686B00C5; Fri, 13 Nov 2020 06:04:58 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id E6BB66B00D2; Fri, 13 Nov 2020 06:04:58 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CBE8C6B00D3; Fri, 13 Nov 2020 06:04:58 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0146.hostedemail.com [216.40.44.146]) by kanga.kvack.org (Postfix) with ESMTP id 9D61F6B00C5 for <linux-mm@kvack.org>; Fri, 13 Nov 2020 06:04:58 -0500 (EST) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 4877C180AD801 for <linux-mm@kvack.org>; Fri, 13 Nov 2020 11:04:58 +0000 (UTC) X-FDA: 77479112676.14.snake69_3415aa92730e Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin14.hostedemail.com (Postfix) with ESMTP id 1F3ED1822987B for <linux-mm@kvack.org>; Fri, 13 Nov 2020 11:04:58 +0000 (UTC) X-Spam-Summary: 1,0,0,fdfa0bc3123cac0c,d41d8cd98f00b204,songmuchun@bytedance.com,,RULES_HIT:41:355:379:541:800:960:965:966:973:988:989:1260:1311:1314:1345:1359:1437:1515:1534:1540:1711:1714:1730:1747:1777:1792:2196:2198:2199:2200:2393:2559:2562:2731:3138:3139:3140:3141:3142:3350:3865:3866:3867:3871:4385:4390:4395:5007:6261:6653:6737:6738:8603:10004:11026:11658:11914:12043:12048:12297:12438:12517:12519:12555:12895:13069:13255:13311:13357:13894:14181:14384:14394:14721:21080:21094:21323:21444:21451:21627:21966:21990:30029:30054,0,RBL:209.85.214.195:@bytedance.com:.lbl8.mailshell.net-66.100.201.201 62.2.0.100;04yg51pykbhm9jzc397aqdey6xbeoyc9rzzomzgqy11jmiqq4q3x31jqcopn3py.3uamkk1cyah6xwz11cj39f3g59yr3gd1tkdtg699u6zkaqqnjdegm7axuwg9dtm.n-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:69,LUA_SUMMARY:none X-HE-Tag: snake69_3415aa92730e X-Filterd-Recvd-Size: 4485 Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by imf19.hostedemail.com (Postfix) with ESMTP for <linux-mm@kvack.org>; Fri, 13 Nov 2020 11:04:57 +0000 (UTC) Received: by mail-pl1-f195.google.com with SMTP id d17so2872733plr.5 for <linux-mm@kvack.org>; Fri, 13 Nov 2020 03:04:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=l9UdRDVTVA9p+ZXsVGnKTJDsCrdBiTFetvlG+i4H0yc=; b=AS+sztqaorePlJ6XZc9emmP6jtL7Eyohp2JdsVut2PX0qLCIhzXU6ZdcJNpPT2gjOe +Upw+iEiBZHarM+fDYKJ24SteIFOnAxkt0PnoSN9xIN+zKMt6XsBfFJst8vLxfPbvaaZ 3HckQ+Q1gdNF7ujCbFtJv3uZ663GT/F+DlFdAGfuCDSDhUdo39cI2ocg9Zbk7PC+8S6R SF+j5BdZAwEeaifFMgIKWevLMFqE5W82s4o+s3+i3M2wJ2su6gKMyxDi2HGeX2RgZMFQ JI3/Zs3B81JEDn9BoL/g6z8C02w7I8hiSmC6NUvWLgQjb2XHmALoyUA1IvWAVASMiGKR usWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=l9UdRDVTVA9p+ZXsVGnKTJDsCrdBiTFetvlG+i4H0yc=; b=BYrobKtdnsvG1jtUAhY3dG680cvPtJQcT8XS9ahQhzUx2RXOUMQxCcs3p69YvVPrhe o2NJd1GI7a0UenvMQtHwzREdXLpQ+PfgCJCcHR0acSEfv6blnRaNEYCA1dYVixYaQyNT /RepXIQs2HPfVL/bpwfPa3CZKCLFe7fbAjxltJqHu5WAs+mHUmo1hP6gLQOvQOSyGaCi mY0ue/8Pvj5eAtJ1z1ZPw53Y2e3mPvyL+zpjWmCjoZ/aoDrYghFOK+J9nAg0V9Eq77g+ q8Q0aNeemoYbY8p/FHYfit6dxuvOUH1Zss8Cdmw7KlPle27kRM2v+uwD8IDTCdov8Tp8 rs3Q== X-Gm-Message-State: AOAM532r8YhM88kgVOXl7y1VXhv+Z59qm6QKwu/63Ws+m3t6T5StyPKy RBVwxSAcViA0H3zmXlS3b65WXg== X-Google-Smtp-Source: ABdhPJxzUgobcNi9dq/vlyFNji/6h++fpZQcRbnQtl2TuCezjK46BhKasiCuxIhitc0mAP75n+y8iw== X-Received: by 2002:a17:902:9a48:b029:d6:e0ba:f301 with SMTP id x8-20020a1709029a48b02900d6e0baf301mr1794976plv.30.1605265496908; Fri, 13 Nov 2020 03:04:56 -0800 (PST) Received: from localhost.localdomain ([61.120.150.78]) by smtp.gmail.com with ESMTPSA id f1sm8909959pfc.56.2020.11.13.03.04.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Nov 2020 03:04:56 -0800 (PST) From: Muchun Song <songmuchun@bytedance.com> To: corbet@lwn.net, mike.kravetz@oracle.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, x86@kernel.org, hpa@zytor.com, dave.hansen@linux.intel.com, luto@kernel.org, peterz@infradead.org, viro@zeniv.linux.org.uk, akpm@linux-foundation.org, paulmck@kernel.org, mchehab+huawei@kernel.org, pawan.kumar.gupta@linux.intel.com, rdunlap@infradead.org, oneukum@suse.com, anshuman.khandual@arm.com, jroedel@suse.de, almasrymina@google.com, rientjes@google.com, willy@infradead.org, osalvador@suse.de, mhocko@suse.com Cc: duanxiongchun@bytedance.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Muchun Song <songmuchun@bytedance.com> Subject: [PATCH v4 21/21] mm/hugetlb: Disable freeing vmemmap if struct page size is not power of two Date: Fri, 13 Nov 2020 18:59:52 +0800 Message-Id: <20201113105952.11638-22-songmuchun@bytedance.com> X-Mailer: git-send-email 2.21.0 (Apple Git-122) In-Reply-To: <20201113105952.11638-1-songmuchun@bytedance.com> References: <20201113105952.11638-1-songmuchun@bytedance.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
Free some vmemmap pages of hugetlb page
|
expand
|
diff --git a/mm/hugetlb_vmemmap.c b/mm/hugetlb_vmemmap.c index f67aec6e3bb1..a0a5df9dba6b 100644 --- a/mm/hugetlb_vmemmap.c +++ b/mm/hugetlb_vmemmap.c @@ -635,7 +635,8 @@ void __init hugetlb_vmemmap_init(struct hstate *h) unsigned int order = huge_page_order(h); unsigned int vmemmap_pages; - if (hugetlb_free_vmemmap_disabled) { + if (hugetlb_free_vmemmap_disabled || + !is_power_of_2(sizeof(struct page))) { h->nr_free_vmemmap_pages = 0; pr_info("disable free vmemmap pages for %s\n", h->name); return;
We only can free the unused vmemmap to the buddy system when the size of struct page is a power of two. Signed-off-by: Muchun Song <songmuchun@bytedance.com> --- mm/hugetlb_vmemmap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)