From: Oleg Nesterov <oleg@tv-sign.ru>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
Christoph Lameter <christoph@lameter.com>,
Andrew Morton <akpm@osdl.org>
Subject: [PATCH 4/5] timers: remove memory barriers
Date: Sat, 19 Mar 2005 21:30:41 +0300 [thread overview]
Message-ID: <423C6FD1.748BCC89@tv-sign.ru> (raw)
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);
{
reply other threads:[~2005-03-19 17:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=423C6FD1.748BCC89@tv-sign.ru \
--to=oleg@tv-sign.ru \
--cc=akpm@osdl.org \
--cc=christoph@lameter.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®