[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210607184805.eddf8eb26b80e8af85d5777e@linux-foundation.org>
Date: Mon, 7 Jun 2021 18:48:05 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Nicholas Piggin <npiggin@...il.com>
Cc: Anton Blanchard <anton@...abs.org>, linux-arch@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
linuxppc-dev@...ts.ozlabs.org, Andy Lutomirski <luto@...nel.org>,
Randy Dunlap <rdunlap@...radead.org>
Subject: Re: [PATCH v4 1/4] lazy tlb: introduce lazy mm refcount helper
functions
On Tue, 08 Jun 2021 11:39:56 +1000 Nicholas Piggin <npiggin@...il.com> wrote:
> > Looks like a functional change. What's happening here?
>
> That's kthread_use_mm being clever about the lazy tlb mm. If it happened
> that the kthread had inherited a the lazy tlb mm that happens to be the
> one we want to use here, then we already have a refcount to it via the
> lazy tlb ref.
>
> So then it doesn't have to touch the refcount, but rather just converts
> it from the lazy tlb ref to the returned reference. If the lazy tlb mm
> doesn't get a reference, we can't do that.
Please cover this in the changelog and perhaps a code comment.
Powered by blists - more mailing lists