lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YMvGPWHY993l3OYj@google.com>
Date:   Thu, 17 Jun 2021 22:01:33 +0000
From:   Dennis Zhou <dennis@...nel.org>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     Roman Gushchin <guro@...com>, Tejun Heo <tj@...nel.org>,
        Christoph Lameter <cl@...ux.com>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] percpu: optimize locking in pcpu_balance_workfn()

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ