Messages in this thread Patch in this message | | | Date | Sun, 28 Nov 2004 18:06:52 +0300 | From | Oleg Nesterov <> | Subject | [PATCH 1/2] rcu: cosmetic, delete wrong comment, use HARDIRQ_OFFSET |
| |
Hello.
rcu_check_quiescent_state: /* * Races with local timer interrupt - in the worst case * we may miss one quiescent state of that CPU. That is * tolerable. So no need to disable interrupts. */ if (rdp->qsctr == rdp->last_qsctr) return;
Afaics, this comment is misleading. rcu_check_quiescent_state() is executed in softirq context, while rcu_check_callbacks() checks in_softirq() before ++qsctr.
Also, replace (1 << HARDIRQ_SHIFT) by HARDIRQ_OFFSET.
On top of the 'rcu: eliminate rcu_ctrlblk.lock', see http://marc.theaimsgroup.com/?l=linux-kernel&m=110156786721526
Oleg.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
--- 2.6.10-rc2/kernel/rcupdate.c~ 2004-11-27 21:40:02.000000000 +0300 +++ 2.6.10-rc2/kernel/rcupdate.c 2004-11-28 17:29:19.084446040 +0300 @@ -229,11 +229,6 @@ static void rcu_check_quiescent_state(st if (!rdp->qs_pending) return; - /* - * Races with local timer interrupt - in the worst case - * we may miss one quiescent state of that CPU. That is - * tolerable. So no need to disable interrupts. - */ if (rdp->qsctr == rdp->last_qsctr) return; rdp->qs_pending = 0; @@ -358,7 +353,7 @@ void rcu_check_callbacks(int cpu, int us { if (user || (idle_cpu(cpu) && !in_softirq() && - hardirq_count() <= (1 << HARDIRQ_SHIFT))) { + hardirq_count() <= HARDIRQ_OFFSET)) { rcu_qsctr_inc(cpu); rcu_bh_qsctr_inc(cpu); } else if (!in_softirq()) - 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/
| |