Re: [PATCH 3/3] sched/core: update preempt_notifier_key to modern api
From: Peter Zijlstra
Date: Mon Mar 26 2018 - 04:35:24 EST
On Sun, Mar 25, 2018 at 12:10:56PM -0700, Davidlohr Bueso wrote:
> No changes in refcount semantics -- key init is false; replace
>
> static_key_slow_inc|dec with static_branch_inc|dec
> static_key_false with static_branch_unlikely
>
> Signed-off-by: Davidlohr Bueso <dbueso@xxxxxxx>
> ---
> kernel/sched/core.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index 757d5a251ca4..311451e58c3c 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -2462,17 +2462,17 @@ void wake_up_new_task(struct task_struct *p)
>
> #ifdef CONFIG_PREEMPT_NOTIFIERS
>
> -static struct static_key preempt_notifier_key = STATIC_KEY_INIT_FALSE;
> +DEFINE_STATIC_KEY_FALSE(preempt_notifier_key);
and again..