From: Matthew Wilcox <willy@infradead.org>
To: Roman Gushchin <guro@fb.com>
Cc: Dennis Zhou <dennis@kernel.org>, 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 20:56:23 +0100 [thread overview]
Message-ID: <YMuo55c9QM91pc9p@casper.infradead.org> (raw)
In-Reply-To: <20210617190322.3636731-1-guro@fb.com>
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:
* 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.
next prev parent reply other threads:[~2021-06-17 19:56 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 [this message]
2021-06-17 22:01 ` Dennis Zhou
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=YMuo55c9QM91pc9p@casper.infradead.org \
--to=willy@infradead.org \
--cc=cl@linux.com \
--cc=dennis@kernel.org \
--cc=guro@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--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;
as well as URLs for NNTP newsgroup(s).