From: Benjamin Herrenschmidt <benh@au1.ibm.com>
To: Nicholas Piggin <npiggin@gmail.com>, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/64s/radix: reset mm_cpumask for single thread process when possible
Date: Wed, 09 May 2018 18:31:55 +1000 [thread overview]
Message-ID: <0c3d18301bc3eb86da197ecefb22aec5c6f70a57.camel@au1.ibm.com> (raw)
In-Reply-To: <20180509065613.14762-1-npiggin@gmail.com>
On Wed, 2018-05-09 at 16:56 +1000, Nicholas Piggin wrote:
> When a single-threaded process has a non-local mm_cpumask and requires
> a full PID tlbie invalidation, use that as an opportunity to reset the
> cpumask back to the current CPU we're running on.
>
> No other thread can concurrently switch to this mm, because it must
> have had a reference on mm_users before it could use_mm. mm_users can
> be asynchronously incremented e.g., by mmget_not_zero, but those users
> must not be doing use_mm.
What do you mean ? I don't fully understand how this isn't racy with
another thread being created, switching to that mm, and then having its
bit cleared by us ? Also why not use_mm ? what prevents it ?
Cheers,
Ben.
next prev parent reply other threads:[~2018-05-09 8:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-09 6:56 [PATCH] powerpc/64s/radix: reset mm_cpumask for single thread process when possible Nicholas Piggin
2018-05-09 8:23 ` Balbir Singh
2018-05-09 11:22 ` Nicholas Piggin
2018-05-09 8:31 ` Benjamin Herrenschmidt [this message]
2018-05-09 11:53 ` Nicholas Piggin
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=0c3d18301bc3eb86da197ecefb22aec5c6f70a57.camel@au1.ibm.com \
--to=benh@au1.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=npiggin@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).