Message ID | 20230105101844.1893104-6-jthoughton@google.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03065C3DA7D for <linux-mm@archiver.kernel.org>; Thu, 5 Jan 2023 10:19:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6D1DB900005; Thu, 5 Jan 2023 05:19:02 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 683DB8E0001; Thu, 5 Jan 2023 05:19:02 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4D4DD900005; Thu, 5 Jan 2023 05:19:02 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 3987A8E0001 for <linux-mm@kvack.org>; Thu, 5 Jan 2023 05:19:02 -0500 (EST) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 14245120D03 for <linux-mm@kvack.org>; Thu, 5 Jan 2023 10:19:02 +0000 (UTC) X-FDA: 80320347324.23.217F70B Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) by imf08.hostedemail.com (Postfix) with ESMTP id 89128160007 for <linux-mm@kvack.org>; Thu, 5 Jan 2023 10:19:00 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=D05RGKnu; spf=pass (imf08.hostedemail.com: domain of 3E6S2YwoKCFoBL9GM89LGF8GG8D6.4GEDAFMP-EECN24C.GJ8@flex--jthoughton.bounces.google.com designates 209.85.128.201 as permitted sender) smtp.mailfrom=3E6S2YwoKCFoBL9GM89LGF8GG8D6.4GEDAFMP-EECN24C.GJ8@flex--jthoughton.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1672913940; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=QisuvGCTCnQrC46aY73QASoWAbEZFo7ff5Vj8AOV5D4=; b=GxAzqqlJt95F9CC8JIy3+yXqsZryqcN7NxK59DxOweq55JWO9uCDvhhj0gb7Ds5Lr73FPw 7QKnmgXeZmYtJ6fxm7bkv0KPKePzdNuWAn1J/egy/vnDE9pwRL4EQcri63zU6L6ZRwSEi+ uOW0v5KfF78QqWSHk2ik7pLqxMrm7vg= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=D05RGKnu; spf=pass (imf08.hostedemail.com: domain of 3E6S2YwoKCFoBL9GM89LGF8GG8D6.4GEDAFMP-EECN24C.GJ8@flex--jthoughton.bounces.google.com designates 209.85.128.201 as permitted sender) smtp.mailfrom=3E6S2YwoKCFoBL9GM89LGF8GG8D6.4GEDAFMP-EECN24C.GJ8@flex--jthoughton.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1672913940; a=rsa-sha256; cv=none; b=fZcnGnyT8qadcZdNuZT178LTHwR1V5iOnD0/vqwyAsI3ooJUsZD4iHCt2zCTfUnRwCHwU7 vLEJsKl43iAg6pFTrn02geKsdkPoIGHW0ycZ51qt4Gdd2rlXkwmgcol3XS1A0t0wjXa5ov c7znP2Vy+MNtDiyugNpedD8cYjvrdfQ= Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-45a51c37009so376783207b3.17 for <linux-mm@kvack.org>; Thu, 05 Jan 2023 02:19:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=QisuvGCTCnQrC46aY73QASoWAbEZFo7ff5Vj8AOV5D4=; b=D05RGKnu5npzQ4+IoIOCUoopJdHBZlGdmzR7wKgjiYJ7fpsPJXuc7/AVMHrkDHqo2o RNix7ExBJuxdhCqhn48A5PCySgryuQc3GCHIVd9cC5LTv0Q9aGo5YYJG8Ce+XT9OpeXk M3IL0FBVE2YUx+rEwav3paVke2g6M0EhpZNkkEWcM4bLj0uxgg8utb4DdIrHzftCy4tA Kij4pO4w0SwaaYqXSHOVWmgJ+wQsZ23Y9Y/ujE19y5mdHZG78XAtWGKWdrNVRkm9Nl44 elMxTtHTuRQV91u0RG0dTfAvGUJKSIuBA+Spih8dBWhAl2BkcB0t7zcxNmwHvfL9sk81 3ptA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QisuvGCTCnQrC46aY73QASoWAbEZFo7ff5Vj8AOV5D4=; b=rrUgaMwnaBnvnYJJ20TxOGvLsGYHCc8dEuuqYHxIFvl5Y4gB5245MkCVoapeNRds1/ lTVOLFg4EE3+vm3WlpXpjbpBJ2e5NcUbVohM83ewTO/85OxzJEIZuirokdexrxrp4DVq 7Two21shgKsA9Iw5gHJXKfOQ4q2Pi2bTF3Wqm1zIz9zLrhA7K4T4pkBV2t7hBKByigjr 6MMZOZDlzm8ZPrbVq57Kjd0LSyqwMJEoSHMDO+vC6ztnRZjB00oVkhHRTBKwhGNiYfjB T946V07eZb6v0ghQ1Ix5DpFQWJzqg0MdYBsl8VoLowTwn8b0KZlLGd0S/+ltm+/nu2eI ndfw== X-Gm-Message-State: AFqh2krMG5cvn0Tz2k4RG6A16rWUI4hM+U0ZQOo8xlgdKhvY93DRg3TI ish/0oD/ZQwc/qFVeI4ryMgUs/ssZifITy52 X-Google-Smtp-Source: AMrXdXuNwgkkz9NCdvDombHELm4ryvn27Y2ZeR0xTnznCwFeZu8QafDmhNLkdStzMtbGd0AFx5F58froof/Omrr/ X-Received: from jthoughton.c.googlers.com ([fda3:e722:ac3:cc00:14:4d90:c0a8:2a4f]) (user=jthoughton job=sendgmr) by 2002:a25:ab4a:0:b0:7b4:df57:d887 with SMTP id u68-20020a25ab4a000000b007b4df57d887mr131335ybi.601.1672913939807; Thu, 05 Jan 2023 02:18:59 -0800 (PST) Date: Thu, 5 Jan 2023 10:18:03 +0000 In-Reply-To: <20230105101844.1893104-1-jthoughton@google.com> Mime-Version: 1.0 References: <20230105101844.1893104-1-jthoughton@google.com> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog Message-ID: <20230105101844.1893104-6-jthoughton@google.com> Subject: [PATCH 05/46] hugetlb: add CONFIG_HUGETLB_HIGH_GRANULARITY_MAPPING From: James Houghton <jthoughton@google.com> To: Mike Kravetz <mike.kravetz@oracle.com>, Muchun Song <songmuchun@bytedance.com>, Peter Xu <peterx@redhat.com> Cc: David Hildenbrand <david@redhat.com>, David Rientjes <rientjes@google.com>, Axel Rasmussen <axelrasmussen@google.com>, Mina Almasry <almasrymina@google.com>, "Zach O'Keefe" <zokeefe@google.com>, Manish Mishra <manish.mishra@nutanix.com>, Naoya Horiguchi <naoya.horiguchi@nec.com>, "Dr . David Alan Gilbert" <dgilbert@redhat.com>, "Matthew Wilcox (Oracle)" <willy@infradead.org>, Vlastimil Babka <vbabka@suse.cz>, Baolin Wang <baolin.wang@linux.alibaba.com>, Miaohe Lin <linmiaohe@huawei.com>, Yang Shi <shy828301@gmail.com>, Andrew Morton <akpm@linux-foundation.org>, linux-mm@kvack.org, linux-kernel@vger.kernel.org, James Houghton <jthoughton@google.com> Content-Type: text/plain; charset="UTF-8" X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 89128160007 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 d6dFznDo YBkewkylcVXgW7G0mpDelmdkOxgakp8Kgr2QG6jrXljkeQuTBjm0W3lt2VWE9PYWJR6uh7t64CT+cLI4jYXFTMJPTMJPGex0seOarjAwUPInMfxv5lhu8MM4wi/VLu7+bxrPmkJVS41hRs16YLZZtI7Q9rDCC93yxFNo1+MHYIwEbjHAwxG32mGE4bD+IynGTOzNKyd9BYdPf9CS0v/WZ4K5r24Hhcbzwy734JYC0erRn4VfuRrG7wzp1I4JSsV7Z2q/jhJUaEz/mVPyARC5XMQxxug2uBjP9MetEQrDSVubxgIpzP2m6MN0qv1h+mf86M72gwY7vvdLny1SWjhKlPa0Byx2fd/huPSilZHgvWeIDBQR8DA0PF7x8JgPeEpS17FdmSytGYDfox4YMfArNDkHxcKUpDzzpwiPbnzhu98JuxrfYGubsEsQJGSaiPM50JnbW 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 |
Based on latest mm-unstable (85b44c25cd1e).
|
expand
|
diff --git a/fs/Kconfig b/fs/Kconfig index 2685a4d0d353..ce2567946016 100644 --- a/fs/Kconfig +++ b/fs/Kconfig @@ -267,6 +267,13 @@ config HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ON enable HVO by default. It can be disabled via hugetlb_free_vmemmap=off (boot command line) or hugetlb_optimize_vmemmap (sysctl). +config ARCH_WANT_HUGETLB_HIGH_GRANULARITY_MAPPING + bool + +config HUGETLB_HIGH_GRANULARITY_MAPPING + def_bool HUGETLB_PAGE + depends on ARCH_WANT_HUGETLB_HIGH_GRANULARITY_MAPPING + config MEMFD_CREATE def_bool TMPFS || HUGETLBFS
This adds the Kconfig to enable or disable high-granularity mapping. Each architecture must explicitly opt-in to it (via ARCH_WANT_HUGETLB_HIGH_GRANULARITY_MAPPING), but when opted in, HGM will be enabled by default if HUGETLB_PAGE is enabled. Signed-off-by: James Houghton <jthoughton@google.com> --- fs/Kconfig | 7 +++++++ 1 file changed, 7 insertions(+)