From: Dave Hansen <dave.hansen@intel.com>
To: Brian Gerst <brgerst@gmail.com>, Ingo Molnar <mingo@kernel.org>
Cc: Javier Pello <devel@otheo.eu>,
linux-kernel@vger.kernel.org, x86@kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH 1/1] x86/mm/pae: Align up pteval_t, pmdval_t and pudval_t to avoid split locks
Date: Thu, 4 Apr 2024 09:29:59 -0700 [thread overview]
Message-ID: <9af9094e-f8f6-4303-880b-8576cf51b7e4@intel.com> (raw)
In-Reply-To: <CAMzpN2hcZNewSmHn77Y-WAZjR-Pir=31dkgRHOzP+=kEa8_LdQ@mail.gmail.com>
On 4/4/24 08:36, Brian Gerst wrote:
>> It creates extra constraints on stack layout that wasn't there before,
>> so it can only be an invariant if the compiler can reorder variables,
>> or make the stack layout worse (introducing more holes).
> For the record, stack alignments are not rare.
>
> objdump -dr vmlinux | grep "and.*,%.sp$" | wc -l
>
> 64-bit defconfig: 646
> 32-bit defconfig: 449
It's not about stack alignment for me.
The bigger question is: are we going to *maintain* the 32-bit code base
to keep it free of split locks.
It's not even just a question of how many more of these are lurking
today. Any future code that (for instance) checks
system_has_cmpxchg64() and then goes to do something fancy on the stack,
or with structure members that aren't carefully aligned will need
maintenance.
Sean is basically saying, "Please keep this feature so that it's easy to
find these on 32-bit and maintain the code base to preserve
performance". That's a perfectly reasonable argument, but only if we
decide that it's worth maintaining the 32-bit code base in this way.
next prev parent reply other threads:[~2024-04-04 16:30 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-01 16:54 [PATCH 0/1] Split lock detected in kernel mode on x86-32 with PAE Javier Pello
2024-04-01 16:57 ` [PATCH 1/1] x86/mm/pae: Align up pteval_t, pmdval_t and pudval_t to avoid split locks Javier Pello
2024-04-01 17:56 ` Dave Hansen
2024-04-02 17:23 ` Javier Pello
2024-04-02 17:43 ` Dave Hansen
2024-04-03 7:57 ` Ingo Molnar
2024-04-03 11:08 ` Brian Gerst
2024-04-04 7:56 ` Ingo Molnar
2024-04-04 15:36 ` Brian Gerst
2024-04-04 16:29 ` Dave Hansen [this message]
2024-04-03 15:54 ` Javier Pello
2024-04-03 15:58 ` Dave Hansen
2024-04-04 15:26 ` Sean Christopherson
2024-04-04 18:31 ` Dave Hansen
2024-04-04 21:55 ` Sean Christopherson
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=9af9094e-f8f6-4303-880b-8576cf51b7e4@intel.com \
--to=dave.hansen@intel.com \
--cc=bp@alien8.de \
--cc=brgerst@gmail.com \
--cc=dave.hansen@linux.intel.com \
--cc=devel@otheo.eu \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.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
all inboxes | Powered by JetHome®