On Wed, 25 Oct 2017 14:49:34 +1100
"Tobin C. Harding" <m...@tobin.cc> wrote:
> 
> First, the static_key stuff.
> 
> DEFINE_STATIC_KEY_TRUE(no_ptr_secret) : Doesn't sleep, just a
> declaration. 
> 
> if (static_branch_unlikely(&no_ptr_secret)) {} : Doesn't sleep, just
> some assembler to jump to returning true or false.
> 
> static_branch_disable(&no_ptr_secret) : Doesn't sleep, just atomic read
> and set and maybe a WARN_ONCE.

How quickly do you need static_branch_disable() executed? You could
always pass the work off to a worker thread (that can schedule).

random_ready_callback -> initiates worker thread -> enables the static branch

-- Steve

Reply via email to