Re: [PATCH 1/2] rcu: cosmetic, delete wrong comment, use HARDIRQ_OFFSET

From: Manfred Spraul
Date: Sun Nov 28 2004 - 10:26:48 EST


Dipankar Sarma wrote:

On Sun, Nov 28, 2004 at 06:06:52PM +0300, Oleg Nesterov wrote:


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.




Looks good to me. IIRC, that comment has been around since very
early prototypes, so it is probably leftover trash.



I agree. I think I only moved it around.
But I don't like the HARDIRQ_OFFSET change. If I understand the code correctly it checks that there is no hardirq reentrancy, i.e. the count is 0 or 1. Shifted to the appropriate position for the actual test.
I'd either leave it as it is or use "1*HARDIRQ_OFFSET" - otherwise the information that the count should be less of equal one is lost.

--
Manfred
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/