lkml.org 
[lkml]   [2021]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] percpu: optimize locking in pcpu_balance_workfn()
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.

\
 
 \ /
  Last update: 2021-06-17 21:57    [W:0.118 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site