From: Dave Hansen <dave.hansen@intel.com>
To: Saravanan D <saravanand@fb.com>,
x86@kernel.org, dave.hansen@linux.intel.com, luto@kernel.org,
peterz@infradead.org
Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH V3] x86/mm: Tracking linear mapping split events
Date: Wed, 27 Jan 2021 15:41:05 -0800 [thread overview]
Message-ID: <a936a943-9d8f-7e3c-af38-1c99ae176e1f@intel.com> (raw)
In-Reply-To: <20210127225059.246646-1-saravanand@fb.com>
On 1/27/21 2:50 PM, Saravanan D wrote:
> +#if defined(__x86_64__)
We don't use __x86_64__ in the kernel. This should be CONFIG_X86.
> +#if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE)
> + "direct_map_2M_splits",
> +#else
> + "direct_map_4M_splits",
> +#endif
> + "direct_map_1G_splits",
> +#endif
These #ifdefs are hideous, and repeated.
I'd rather have no 32-bit support than expose us to this ugliness.
Worst case, the 32-bit non-PAE folks (i.e. almost nobody in the world)
can just live with seeing "2M" when the mappings are really 4M. Or, you
*could* name these after the page table levels:
direct_map_pmd_splits
direct_map_pud_splits
or the level from the bottom where the split occurred:
direct_map_level2_splits
direct_map_level3_splits
That has the bonus of being usable on other architectures.
Oh, and 1G splits aren't possible on non-PAE 32-bit. There are only 2
levels: 4M and 4k, which would make what you have above:
> +#if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE)
> + "direct_map_2M_splits",
> + "direct_map_1G_splits",
> +#else
> + "direct_map_4M_splits",
> +#endif
I don't think there's ever a 1G/4M case.
next prev parent reply other threads:[~2021-01-27 23:45 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <BYAPR01MB40856478D5BE74CB6A7D5578CFBD9@BYAPR01MB4085.prod.exchangelabs.com>
2021-01-25 20:15 ` [PATCH] x86/mm: Tracking linear mapping split events since boot Dave Hansen
2021-01-25 20:32 ` Tejun Heo
2021-01-26 0:47 ` Dave Hansen
2021-01-26 0:53 ` Tejun Heo
2021-01-26 1:04 ` Dave Hansen
2021-01-26 1:17 ` Tejun Heo
2021-01-27 17:51 ` [PATCH V2] x86/mm: Tracking linear mapping split events Saravanan D
2021-01-27 21:03 ` Tejun Heo
2021-01-27 21:32 ` Dave Hansen
2021-01-27 21:36 ` Tejun Heo
2021-01-27 21:42 ` Saravanan D
2021-01-27 22:50 ` [PATCH V3] " Saravanan D
2021-01-27 23:00 ` Randy Dunlap
2021-01-27 23:56 ` Saravanan D
2021-01-27 23:41 ` Dave Hansen [this message]
2021-01-28 0:15 ` Saravanan D
2021-01-28 4:35 ` [PATCH V4] " Saravanan D
2021-01-28 4:51 ` Matthew Wilcox
[not found] ` <20210128104934.2916679-1-saravanand@fb.com>
2021-01-28 15:04 ` [PATCH V5] " Matthew Wilcox
2021-01-28 19:49 ` Saravanan D
2021-01-28 16:33 ` Zi Yan
2021-01-28 16:41 ` Dave Hansen
2021-01-28 16:56 ` Zi Yan
2021-01-28 16:59 ` Song Liu
[not found] ` <3aec2d10-f4c3-d07a-356f-6f1001679181@intel.com>
2021-01-28 21:20 ` Saravanan D
[not found] ` <20210128233430.1460964-1-saravanand@fb.com>
2021-01-28 23:41 ` [PATCH V6] " Tejun Heo
2021-01-29 19:27 ` Johannes Weiner
2021-02-08 23:17 ` Saravanan D
2021-02-08 23:30 ` Dave Hansen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a936a943-9d8f-7e3c-af38-1c99ae176e1f@intel.com \
--to=dave.hansen@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=peterz@infradead.org \
--cc=saravanand@fb.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®