All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dennis Zhou <dennis@kernel.org>
To: Matthew Wilcox <willy@infradead.org>
Cc: Roman Gushchin <guro@fb.com>, Tejun Heo <tj@kernel.org>,
	Christoph Lameter <cl@linux.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] percpu: optimize locking in pcpu_balance_workfn()
Date: Thu, 17 Jun 2021 22:01:33 +0000	[thread overview]
Message-ID: <YMvGPWHY993l3OYj@google.com> (raw)
In-Reply-To: <YMuo55c9QM91pc9p@casper.infradead.org>

Hello,

On Thu, Jun 17, 2021 at 08:56:23PM +0100, Matthew Wilcox wrote:
> On Thu, Jun 17, 2021 at 12:03:22PM -0700, Roman Gushchin wrote:
> > +++ b/mm/percpu.c
> > @@ -1980,6 +1980,9 @@ void __percpu *__alloc_reserved_percpu(size_t size, size_t align)
> >   * If empty_only is %false, reclaim all fully free chunks regardless of the
> >   * number of populated pages.  Otherwise, only reclaim chunks that have no
> >   * populated pages.
> > + *
> > + * CONTEXT:
> > + * pcpu_lock (can be dropped temporarily)
> >   */
> 
> What's the shouting all about?  I would write it like this:

At this point it's just to keep the code consistent.

> 
>  * Context: Process context.  Caller must hold pcpu_lock with interrupts
>  * disabled.  This function may drop the lock and re-enable interrupts if
>  * it needs to sleep, but will return with the lock held and interrupts
>  * disabled.
> 

This is related to background work done via a workqueue not in process
context. I'll take a look at cleaning up the documentation in the
future.

Thanks,
Dennis

  reply	other threads:[~2021-06-17 22:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-17 19:03 [PATCH v2] percpu: optimize locking in pcpu_balance_workfn() Roman Gushchin
2021-06-17 19:56 ` Matthew Wilcox
2021-06-17 22:01   ` Dennis Zhou [this message]
2021-06-18  2:53 ` 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=YMvGPWHY993l3OYj@google.com \
    --to=dennis@kernel.org \
    --cc=cl@linux.com \
    --cc=guro@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=tj@kernel.org \
    --cc=willy@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.