diff options
Diffstat (limited to 'kernel/rcutiny_plugin.h')
| -rw-r--r-- | kernel/rcutiny_plugin.h | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/kernel/rcutiny_plugin.h b/kernel/rcutiny_plugin.h index 2b0484a5dc28..9cb1ae4aabdd 100644 --- a/kernel/rcutiny_plugin.h +++ b/kernel/rcutiny_plugin.h | |||
| @@ -312,8 +312,8 @@ static int rcu_boost(void) | |||
| 312 | rt_mutex_lock(&mtx); | 312 | rt_mutex_lock(&mtx); |
| 313 | rt_mutex_unlock(&mtx); /* Keep lockdep happy. */ | 313 | rt_mutex_unlock(&mtx); /* Keep lockdep happy. */ |
| 314 | 314 | ||
| 315 | return rcu_preempt_ctrlblk.boost_tasks != NULL || | 315 | return ACCESS_ONCE(rcu_preempt_ctrlblk.boost_tasks) != NULL || |
| 316 | rcu_preempt_ctrlblk.exp_tasks != NULL; | 316 | ACCESS_ONCE(rcu_preempt_ctrlblk.exp_tasks) != NULL; |
| 317 | } | 317 | } |
| 318 | 318 | ||
| 319 | /* | 319 | /* |
| @@ -885,6 +885,19 @@ static void invoke_rcu_callbacks(void) | |||
| 885 | wake_up(&rcu_kthread_wq); | 885 | wake_up(&rcu_kthread_wq); |
| 886 | } | 886 | } |
| 887 | 887 | ||
| 888 | #ifdef CONFIG_RCU_TRACE | ||
| 889 | |||
| 890 | /* | ||
| 891 | * Is the current CPU running the RCU-callbacks kthread? | ||
| 892 | * Caller must have preemption disabled. | ||
| 893 | */ | ||
| 894 | static bool rcu_is_callbacks_kthread(void) | ||
| 895 | { | ||
| 896 | return rcu_kthread_task == current; | ||
| 897 | } | ||
| 898 | |||
| 899 | #endif /* #ifdef CONFIG_RCU_TRACE */ | ||
| 900 | |||
| 888 | /* | 901 | /* |
| 889 | * This kthread invokes RCU callbacks whose grace periods have | 902 | * This kthread invokes RCU callbacks whose grace periods have |
| 890 | * elapsed. It is awakened as needed, and takes the place of the | 903 | * elapsed. It is awakened as needed, and takes the place of the |
| @@ -938,6 +951,18 @@ void invoke_rcu_callbacks(void) | |||
| 938 | raise_softirq(RCU_SOFTIRQ); | 951 | raise_softirq(RCU_SOFTIRQ); |
| 939 | } | 952 | } |
| 940 | 953 | ||
| 954 | #ifdef CONFIG_RCU_TRACE | ||
| 955 | |||
| 956 | /* | ||
| 957 | * There is no callback kthread, so this thread is never it. | ||
| 958 | */ | ||
| 959 | static bool rcu_is_callbacks_kthread(void) | ||
| 960 | { | ||
| 961 | return false; | ||
| 962 | } | ||
| 963 | |||
| 964 | #endif /* #ifdef CONFIG_RCU_TRACE */ | ||
| 965 | |||
| 941 | void rcu_init(void) | 966 | void rcu_init(void) |
| 942 | { | 967 | { |
| 943 | open_softirq(RCU_SOFTIRQ, rcu_process_callbacks); | 968 | open_softirq(RCU_SOFTIRQ, rcu_process_callbacks); |
