linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dennis Zhou <dennis@kernel.org>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Tejun Heo <tj@kernel.org>, Christoph Lameter <cl@linux.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] percpu: flush tlb after pcpu_depopulate_chunk()
Date: Sat, 3 Jul 2021 16:57:30 +0000	[thread overview]
Message-ID: <YOCW+pbXt5laJF8v@google.com> (raw)
In-Reply-To: <YN/0rmO0p6IJcImj@google.com>

On Sat, Jul 03, 2021 at 05:25:02AM +0000, Dennis Zhou wrote:
> On Fri, Jul 02, 2021 at 10:14:44PM -0700, Guenter Roeck wrote:
> > On Sat, Jul 03, 2021 at 04:04:49AM +0000, Dennis Zhou wrote:
> > > Prior to "percpu: implement partial chunk depopulation",
> > > pcpu_depopulate_chunk() was called only on the destruction path. This
> > > meant the virtual address range was on its way back to vmalloc which
> > > will handle flushing the tlbs for us.
> > > 
> > > However, now that we call pcpu_depopulate_chunk() during the active
> > > lifecycle of a chunk, we need to flush the tlb as well otherwise we can
> > > end up accessing the wrong page through an invalid tlb mapping.
> > > 
> > > This was reported in [1].
> > > 
> > > [1] https://lore.kernel.org/lkml/20210702191140.GA3166599@roeck-us.net/
> > > 
> > > Fixes: f183324133ea ("percpu: implement partial chunk depopulation")
> > > Reported-by: Guenter Roeck <linux@roeck-us.net>
> > > Signed-off-by: Dennis Zhou <dennis@kernel.org>
> > 
> > Tested-by: Guenter Roeck <linux@roeck-us.net>
> > 
> > Thanks!
> > Guenter
> >
> 
> I updated the tag and have applied this to for-5.14-fixes so it can get
> some for-next exposure before I send a fix to Linus.
> 
> Thanks for setting up the super easy repro! It made debugging this
> significantly easier.
> 

I'm pulling this because I think I'll need to do some aggregation to
make this less expensive. I'll send some variant soon hopefully.

Thanks,
Dennis


  reply	other threads:[~2021-07-03 16:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-03  5:14 Guenter Roeck
2021-07-03  5:25 ` Dennis Zhou
2021-07-03 16:57   ` Dennis Zhou [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-07-03  4:04 Dennis Zhou

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=YOCW+pbXt5laJF8v@google.com \
    --to=dennis@kernel.org \
    --cc=cl@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux@roeck-us.net \
    --cc=tj@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