Thread (30 messages) 30 messages, 3 authors, 2020-07-14

Re: [RFC PATCH 11/15] memremap: Add zone device access protection

From: Peter Zijlstra <peterz@infradead.org>
Date: 2020-07-14 19:40:58
Also in: linux-fsdevel, linux-kselftest, linux-mm, lkml, nvdimm

On Tue, Jul 14, 2020 at 12:10:47PM -0700, Ira Weiny wrote:
On Tue, Jul 14, 2020 at 10:40:57AM +0200, Peter Zijlstra wrote:
quoted
That's an anti-pattern vs static_keys, I'm thinking you actually want
static_key_slow_{inc,dec}() instead of {enable,disable}().
Thanks.  I'll go read the doc for those as I'm not familiar with them.
Look for static_branch_{inc,dec} in include/linux/jump_label.h, it
basically does the refcount thing you need and does the actual
transition on the 0->1 and 1->0 transitions.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help