Messages in this thread Patch in this message | | | Date | Sat, 28 Jan 2006 22:02:01 +0300 | From | Oleg Nesterov <> | Subject | [PATCH] rcu_process_callbacks: don't cli() while testing ->nxtlist |
| |
__rcu_process_callbacks() disables interrupts to protect itself from call_rcu() which adds new entries to ->nxtlist.
However we can check "->nxtlist != NULL" with interrupts enabled, we can't get "false positives" because call_rcu() can only change this condition from 0 to 1.
Tested with rcutorture.ko.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
--- RC-1/kernel/rcupdate.c~ 2006-01-19 18:13:07.000000000 +0300 +++ RC-1/kernel/rcupdate.c 2006-01-29 00:13:24.000000000 +0300 @@ -381,8 +381,8 @@ static void __rcu_process_callbacks(stru rdp->curtail = &rdp->curlist; } - local_irq_disable(); if (rdp->nxtlist && !rdp->curlist) { + local_irq_disable(); rdp->curlist = rdp->nxtlist; rdp->curtail = rdp->nxttail; rdp->nxtlist = NULL; @@ -407,9 +407,8 @@ static void __rcu_process_callbacks(stru rcu_start_batch(rcp); spin_unlock(&rcp->lock); } - } else { - local_irq_enable(); } + rcu_check_quiescent_state(rcp, rdp); if (rdp->donelist) rcu_do_batch(rdp); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |