From: Dave Hansen <dave.hansen@intel.com>
To: "Edgecombe, Rick P" <rick.p.edgecombe@intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>
Cc: "luto@kernel.org" <luto@kernel.org>,
"jgross@suse.com" <jgross@suse.com>,
"x86@kernel.org" <x86@kernel.org>,
"joro@8bytes.org" <joro@8bytes.org>,
"peterz@infradead.org" <peterz@infradead.org>,
"bp@alien8.de" <bp@alien8.de>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"kirill.shutemov@linux.intel.com"
<kirill.shutemov@linux.intel.com>
Subject: Re: [PATCH 1/2] x86/mm: Kill a 32-bit #ifdef for shared PMD handling
Date: Fri, 18 Apr 2025 11:49:12 -0700 [thread overview]
Message-ID: <a2f144f8-09ae-449a-a005-bc8d76dd0260@intel.com> (raw)
In-Reply-To: <3a14471baa1fe0803a27922fe9bd929a0062f780.camel@intel.com>
On 4/18/25 11:18, Edgecombe, Rick P wrote:
> On Fri, 2025-04-18 at 08:56 -0700, Dave Hansen wrote:
>> +
>> + if (IS_ENABLED(CONFIG_X86_64))
>> + return;
> Nit to throw away if you don't like it, but the below code the conditional is
> about special 32 bit requirements, not, not being 64 bit. So I'd have done:
>
> if (!IS_ENABLED(CONFIG_X86_32))
> return;
>
> Probably anyone reading this is going to know CONFIG_X86_64 and CONFIG_X86_32
> are exclusive, and there are only two options. But to me the check is a tiny bit
> harder to read this way. In either case:
I like the suggestion. I think I even wrote it that way originally.
I eventually decided to try and optimize for the lucky guy who comes
through some day and is removing all the non-64-bit code. It would be
easier for them to intuit that the cruft can go away here:
if (IS_ENABLED(CONFIG_X86_64))
return;
// cruft
Does that make sense, or am I optimizing for the wrong thing?
next prev parent reply other threads:[~2025-04-18 18:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-18 15:56 [PATCH 0/2] Minor fixups for PAE simplification Dave Hansen
2025-04-18 15:56 ` [PATCH 1/2] x86/mm: Kill a 32-bit #ifdef for shared PMD handling Dave Hansen
2025-04-18 18:18 ` Edgecombe, Rick P
2025-04-18 18:49 ` Dave Hansen [this message]
2025-04-18 20:07 ` Edgecombe, Rick P
2025-04-18 15:56 ` [PATCH 2/2] x86/mm: Move duplicated 32-bit page table sync mask to common code 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=a2f144f8-09ae-449a-a005-bc8d76dd0260@intel.com \
--to=dave.hansen@intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=jgross@suse.com \
--cc=joro@8bytes.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=peterz@infradead.org \
--cc=rick.p.edgecombe@intel.com \
--cc=tglx@linutronix.de \
--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