lkml.org 
[lkml]   [2005]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 4/5] timers: remove memory barriers
del_timer() and __run_timers() use smp_wmb() before
clearing timer's pending flag. It was needed because
__mod_timer() did not locked old_base if the timer is
not pending, so __mod_timer()->internal_add_timer()
can race with del_timer()->list_del().

With the previous patch these functions are serialized
through base->lock, so the barrier can be killed.

Still needed in del_timer_sync(), because it clears ->_base.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>

--- 2.6.12-rc1/kernel/timer.c~4_BARR 2005-03-19 22:26:50.000000000 +0300
+++ 2.6.12-rc1/kernel/timer.c 2005-03-19 22:28:34.000000000 +0300
@@ -337,8 +337,6 @@ repeat:
goto repeat;
}
list_del(&timer->entry);
- /* Need to make sure that anybody who sees a NULL base also sees the list ops */
- smp_wmb();
__set_base(timer, base, 0);
spin_unlock_irqrestore(&base->lock, flags);

@@ -496,7 +494,6 @@ repeat:

list_del(&timer->entry);
set_running_timer(base, timer);
- smp_wmb();
__set_base(timer, base, 0);
spin_unlock_irq(&base->lock);
{
-
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/
\
 
 \ /
  Last update: 2005-03-22 14:11    [W:0.027 / U:5.740 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site