Message ID | 20230306230004.1387007-3-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 30402C6FD1A for <linux-mm@archiver.kernel.org>; Mon, 6 Mar 2023 23:00:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EDB77280003; Mon, 6 Mar 2023 18:00:15 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E3B9F280001; Mon, 6 Mar 2023 18:00:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C6706280003; Mon, 6 Mar 2023 18:00:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id A7654280001 for <linux-mm@kvack.org>; Mon, 6 Mar 2023 18:00:15 -0500 (EST) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 5DA71160C46 for <linux-mm@kvack.org>; Mon, 6 Mar 2023 23:00:15 +0000 (UTC) X-FDA: 80539993590.15.0135663 Received: from mail-vs1-f73.google.com (mail-vs1-f73.google.com [209.85.217.73]) by imf20.hostedemail.com (Postfix) with ESMTP id 972A51C001B for <linux-mm@kvack.org>; Mon, 6 Mar 2023 23:00:13 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=qvAewIdd; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf20.hostedemail.com: domain of 3fHAGZAoKCJ0GQELRDEQLKDLLDIB.9LJIFKRU-JJHS79H.LOD@flex--jthoughton.bounces.google.com designates 209.85.217.73 as permitted sender) smtp.mailfrom=3fHAGZAoKCJ0GQELRDEQLKDLLDIB.9LJIFKRU-JJHS79H.LOD@flex--jthoughton.bounces.google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1678143613; 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=hIx3kaJ7v5MfcJ3bC83E2C9/NBXIacneT6tynRm3EnA=; b=LjjFS/qgg5/FQCph2nQyrB4uEc8VCQhETrjh4DtMeW60y7PZCdjVP8YeyZp1ZCcYLnVti5 FGaaQgSqkJatLIE+aErwj6BPwl/IiUu10LA76TPV9VYK5FE9pQlp+4kuOFXn/vJ/KyO8I4 /wbmJ/me011kNmlxGU7vlswB4WL8kas= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=qvAewIdd; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf20.hostedemail.com: domain of 3fHAGZAoKCJ0GQELRDEQLKDLLDIB.9LJIFKRU-JJHS79H.LOD@flex--jthoughton.bounces.google.com designates 209.85.217.73 as permitted sender) smtp.mailfrom=3fHAGZAoKCJ0GQELRDEQLKDLLDIB.9LJIFKRU-JJHS79H.LOD@flex--jthoughton.bounces.google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1678143613; a=rsa-sha256; cv=none; b=vhaKqGib7lBMfecTrbbM76uZ4ERlqGdef8XpmkYkaa7bM/S/G0HzstmW771FEisa8UplkF g5V75H/3OM647AuSKpOyp4QIeYmYHhDvrZmh7znl8jqfN9meFwKknpVSIFaDHJMn28qlDa HLaOWyGu5I2Azv3WrRWdS0TkCviLsBo= Received: by mail-vs1-f73.google.com with SMTP id v13-20020a0561020f0d00b0041f24dc9c47so3856745vss.9 for <linux-mm@kvack.org>; Mon, 06 Mar 2023 15:00:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; t=1678143612; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=hIx3kaJ7v5MfcJ3bC83E2C9/NBXIacneT6tynRm3EnA=; b=qvAewIddK0QuhCdcxur8X/IPKYUlFdGMwHQ7wfqwcDsA+ABbNXYVt7Xpud40PyavmQ IgS0CnzzxQ+sURvHsBxhn6GPimrIzKhfHCMChWPpYFWrjeNJ7XSWoE70RERcx6Z4TZ31 Bj3E+88BJofX7eT4wjNwD6s4Tx7DTBBBF/5xs9U7P8rvtXXYIlfW3ttOVJ5Zx1beuTvM TqsqrigZMh7wFnRxKO0xdlf2NGmbwV2th7ywzvaTiOqCG5bnzZXoB7p+fVW1yLJQkwTL bGvPzcmjgTxl+W/H7JWrIJU/d/ADu31M5bVostl04gzRlaNtJrzUFBuglPdaHCUlbFJE UsJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678143612; 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=hIx3kaJ7v5MfcJ3bC83E2C9/NBXIacneT6tynRm3EnA=; b=f6Z2wozhO8FDk0+gU8pO0f+yZksCf/eX/GUZW0JXk2EZksDiL1lw8KDichE2t1Z5HX F10mDLMvpKY1C8YebtZ5pVXR0OlkFNWcyFSIWShoRyfUcgwlqk/NaEhGEbUVPlnK7SYy tr1uJk5pN1o8DudPROJNDxHbsWH/FNSwQ8ZoYjK6FzKRRuMcDG4QEIg7FWYigJZlPrvY hXbn2bOjyNpjkXYgTX/a0HOgBWQoN8DLNk3KKovlKl5tbR3+H/fh4lf2d8lZInD9TP2G qODk0Z/2PgPkN9HjX9/B5NmffyyVqAbgax6eKTxA7l4HunRXsyIXqSuW87WPiU84ykuX IGPQ== X-Gm-Message-State: AO0yUKXEkKtFHfyGY65+5NGT1pl9De2RetbSn1An+MAvCaYyLe0Z7RF1 oLFoRD7wLaCUxS4ETDBaPWz9m47FEmaxOzUV X-Google-Smtp-Source: AK7set910gI7f4wEAiHLGM5tPuw0JcdSRnZOvRyh4XmPDvpbk+ahzqZvHdoFgr9rOMIgHs0nPGCKWy/u/Ys/1cG8 X-Received: from jthoughton.c.googlers.com ([fda3:e722:ac3:cc00:14:4d90:c0a8:2a4f]) (user=jthoughton job=sendgmr) by 2002:a67:d583:0:b0:411:fff6:3cc4 with SMTP id m3-20020a67d583000000b00411fff63cc4mr8672319vsj.3.1678143612654; Mon, 06 Mar 2023 15:00:12 -0800 (PST) Date: Mon, 6 Mar 2023 23:00:04 +0000 In-Reply-To: <20230306230004.1387007-1-jthoughton@google.com> Mime-Version: 1.0 References: <20230306230004.1387007-1-jthoughton@google.com> X-Mailer: git-send-email 2.40.0.rc0.216.gc4246ad0f0-goog Message-ID: <20230306230004.1387007-3-jthoughton@google.com> Subject: [PATCH 2/2] mm: rmap: increase COMPOUND_MAPPED to support 512G HugeTLB pages From: James Houghton <jthoughton@google.com> To: Mike Kravetz <mike.kravetz@oracle.com>, Hugh Dickins <hughd@google.com>, Muchun Song <songmuchun@bytedance.com>, Peter Xu <peterx@redhat.com>, "Matthew Wilcox (Oracle)" <willy@infradead.org>, Andrew Morton <akpm@linux-foundation.org> Cc: "Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>, David Hildenbrand <david@redhat.com>, David Rientjes <rientjes@google.com>, Axel Rasmussen <axelrasmussen@google.com>, Jiaqi Yan <jiaqiyan@google.com>, linux-mm@kvack.org, linux-kernel@vger.kernel.org, James Houghton <jthoughton@google.com> Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 972A51C001B X-Rspamd-Server: rspam09 X-Rspam-User: X-Stat-Signature: nre75bx31nqi1euki3exf7irodsbeiwf X-HE-Tag: 1678143613-769653 X-HE-Meta: U2FsdGVkX18LfJNyX5iQ7C6uHEHTC3538wCy5RreNDaS+gRXWWy83k2s1bs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CT1gOtzIj8NNT3u7AVZMFhLcoj6INXjgRq1V9oqHkNHLGms3idudVWjlmEyIuzwsEApTVSHh+jk6lcr6nK1HzXo+0TBroQNslONjMBkqdx/EommFQrkweF411fgHStk5PtDq/YLe/bLV9Cbm+CiFYZ/OoDNeQEL+Say+Yk7ofhwbuZdRnH5//yTm4RXhn4UXR1B6gn4m0p7qzaoAmOZsItMrO03R79no73GSgJswid/fHPUwhQYd6438PxNQoK9eRAMN3ihUrj1SXRkFM8WweHyDij9q/KqprIMe1qFlaoxwQ1fd3yJf1UFBIgEsw5aYfyMOvWnM3gZacGI4lv3MzOBLibbs3vf/Ofr+7u8tplKUwklp7pyMR4OdtEyOrP3/PRXHPKazNOk57Of32fD545sp8R2fwobLH4ix9s3rcPx3aKGKDFEf7lX1EmE/Ygz5SkBqH5xQokeMqA/lvm7ZDQHF4VG9OBjk5/sbDJEpe0CPG67tHMYQ0/uCUi5MrRXTuzi9WB7k/OsLUC736CIaz+f5BZc05yWQ19dFGDqO6jgnUrqtKmu6Pt7R5w= 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 |
mm: rmap: merge HugeTLB mapcount logic with THPs
|
expand
|
diff --git a/mm/internal.h b/mm/internal.h index 400451a4dd49..994381fd5155 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -53,11 +53,11 @@ struct folio_batch; void page_writeback_init(void); /* - * If a 16GB hugetlb folio were mapped by PTEs of all of its 4kB pages, - * its nr_pages_mapped would be 0x400000: choose the COMPOUND_MAPPED bit - * above that range, instead of 2*(PMD_SIZE/PAGE_SIZE). + * If a 512G hugetlb folio were mapped by PTEs of all of its 4kB pages, + * its nr_pages_mapped would be 2^27 (0x8000000): choose the COMPOUND_MAPPED bit + * above that range. */ -#define COMPOUND_MAPPED 0x800000 +#define COMPOUND_MAPPED (1 << 28) #define FOLIO_PAGES_MAPPED (COMPOUND_MAPPED - 1) /*
Some architectures may want to support 512G HugeTLB pages in the future. Adjust COMPOUND_MAPPED to support this page size. Signed-off-by: James Houghton <jthoughton@google.com>