From: Peter Zijlstra <peterz@infradead.org>
To: Nadav Amit <namit@vmware.com>
Cc: Ingo Molnar <mingo@kernel.org>, Borislav Petkov <bp@alien8.de>,
Andy Lutomirski <luto@kernel.org>, Ingo Molnar <mingo@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
"x86@kernel.org" <x86@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Dave Hansen <dave.hansen@intel.com>
Subject: Re: [PATCH v2] x86/mm/tlb: Remove flush_tlb_info from the stack
Date: Fri, 26 Apr 2019 13:46:10 +0200 [thread overview]
Message-ID: <20190426114610.GC12232@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <14D4B64B-3684-4090-9881-C4A605CF5A19@vmware.com>
On Fri, Apr 26, 2019 at 08:37:37AM +0000, Nadav Amit wrote:
> Interesting! (and thanks for the reference). Well, I said it would be quite
> surprising, and I see you wrote the same thing in the patch ;-)
>
> But correct me if I’m wrong - it does sound as if you “screw” all the uses
> of atomic_inc() and atomic_dec() (~4000 instances) for the fewer uses of
> smp_mb__after_atomic() and smp_mb__before_atomic() (~400 instances).
>
> Do you intend to at least introduce a variant of atomic_inc() without a
> memory barrier?
Based on defconfig build changes that that patch caused, no.
https://lkml.kernel.org/r/20190423121715.GQ4038@hirez.programming.kicks-ass.net
Also note that except x86 and MIPS, the others: ia64, sparc, s390 and
xtensa already have this exact behaviour. Also note, as the patch notes,
that on 86 only atomic_{inc,dec,add,sub}() have this,
atomic_{and,or,xor}() already have the memory clobber.
Also, that would complicate the API too much, people are already getting
it wrong _a_lot_.
https://lkml.kernel.org/r/20190423123209.GR4038@hirez.programming.kicks-ass.net
prev parent reply other threads:[~2019-04-26 12:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-25 18:08 [PATCH v2] x86/mm/tlb: Remove flush_tlb_info from the stack Nadav Amit
2019-04-25 18:50 ` Andy Lutomirski
2019-04-25 19:13 ` Nadav Amit
2019-04-25 19:29 ` Ingo Molnar
2019-04-25 19:42 ` Nadav Amit
2019-04-25 19:48 ` Ingo Molnar
2019-04-25 21:20 ` Nadav Amit
2019-04-26 7:53 ` Peter Zijlstra
2019-04-26 8:37 ` Nadav Amit
2019-04-26 11:46 ` Peter Zijlstra [this message]
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=20190426114610.GC12232@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=bp@alien8.de \
--cc=dave.hansen@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=namit@vmware.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