lkml.org 
[lkml]   [2013]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/8] rcu: remove irq/softirq context check in rcu_read_unlock_special()
On Wed, Aug 07, 2013 at 06:24:58PM +0800, Lai Jiangshan wrote:
> After patch 10f39bb1, "special & RCU_READ_UNLOCK_BLOCKED" can't be true
> in irq nor softirq.(due to RCU_READ_UNLOCK_BLOCKED can only be set
> when preemption)
>
> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
> ---
> kernel/rcutree_plugin.h | 6 ------
> 1 files changed, 0 insertions(+), 6 deletions(-)
>
> diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h
> index 8fd947e..54f7e45 100644
> --- a/kernel/rcutree_plugin.h
> +++ b/kernel/rcutree_plugin.h
> @@ -361,12 +361,6 @@ void rcu_read_unlock_special(struct task_struct *t)
> rcu_preempt_qs(smp_processor_id());
> }
>
> - /* Hardware IRQ handlers cannot block. */
> - if (in_irq() || in_serving_softirq()) {
> - local_irq_restore(flags);
> - return;
> - }
> -

Good point, it is time to relax the redundant checking. Paranoid that
I am, I took an intermediate position, wrapping a WARN_ON_ONCE() around
the check as follows:

if (WARN_ON_ONCE(in_irq() || in_serving_softirq())) {
local_irq_restore(flags);
return;
}

If this warning never triggers over a period of some time, we can remove
it entirely.

I have queued this for 3.14 with your Signed-off-by. Please let me know
if you have any objections.

Thanx, Paul

> /* Clean up if blocked during RCU read-side critical section. */
> if (special & RCU_READ_UNLOCK_BLOCKED) {
> t->rcu_read_unlock_special &= ~RCU_READ_UNLOCK_BLOCKED;
> --
> 1.7.4.4
>



\
 
 \ /
  Last update: 2013-10-30 12:41    [W:0.181 / U:7.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site