From: Oleg Nesterov <oleg@tv-sign.ru>
To: linux-kernel@vger.kernel.org
Cc: Shai Fultheim <Shai@Scalex86.org>,
Christoph Lameter <christoph@lameter.com>,
Andrew Morton <akpm@osdl.org>, Ingo Molnar <mingo@elte.hu>
Subject: Re: [patch] del_timer_sync scalability patch
Date: Fri, 11 Mar 2005 21:54:17 +0300 [thread overview]
Message-ID: <4231E959.141F7D85@tv-sign.ru> (raw)
Hello.
I am not sure, but I think this patch incorrect.
> @@ -466,6 +482,7 @@ repeat:
> set_running_timer(base, timer);
> smp_wmb();
> timer->base = NULL;
------> WINDOW <------
> + set_last_running(timer, base);
> spin_unlock_irq(&base->lock);
Suppose it is the first invocation of timer, so
timer->last_running == NULL.
What if del_timer_sync() happens in that window?
del_timer_sync:
del_timer(); // timer->base == NULL, returns
base = timer->last_running;
if (base) // no, it is still NULL
...
if (timer->base != NULL || timer->last_running != base)
goto del_again; // not taken
return;
I think it is not enough to exchange these 2 lines in
__run_timers, we also need barriers.
Oleg.
next reply other threads:[~2005-03-11 17:49 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-11 18:54 Oleg Nesterov [this message]
2005-03-11 20:57 ` Christoph Lameter
2005-03-15 17:19 ` [PATCH 0/2] del_timer_sync: proof of concept Oleg Nesterov
2005-03-15 18:15 ` Christoph Lameter
2005-03-15 19:41 ` Oleg Nesterov
2005-03-15 19:02 ` Christoph Lameter
2005-03-16 16:55 ` Oleg Nesterov
2005-03-15 17:19 ` [PATCH 1/2] " Oleg Nesterov
2005-03-15 17:20 ` [PATCH 2/2] " Oleg Nesterov
2005-03-16 9:00 ` Ingo Molnar
2005-03-16 12:09 ` Oleg Nesterov
2005-03-16 13:52 ` Ingo Molnar
2005-03-13 13:13 ` [patch] del_timer_sync scalability patch Oleg Nesterov
2005-03-14 19:40 ` Christoph Lameter
2005-03-15 9:12 ` Oleg Nesterov
2005-03-15 8:06 ` Christoph Lameter
2005-03-15 9:28 ` Ingo Molnar
2005-03-15 10:28 ` Oleg Nesterov
-- strict thread matches above, loose matches on Subject: below --
2005-03-20 23:19 Chen, Kenneth W
2005-03-20 23:34 ` Andrew Morton
2005-03-21 0:47 ` Christoph Lameter
2005-03-21 1:00 ` Andrew Morton
2005-03-21 0:54 ` Christoph Lameter
2005-03-21 1:17 ` Andrew Morton
2005-03-08 6:47 Christoph Lameter
2005-03-08 7:32 ` Andrew Morton
2005-03-08 8:19 ` Ingo Molnar
2005-03-08 8:33 ` Andrew Morton
2005-03-08 20:05 ` Christoph Lameter
2005-03-08 19:44 ` Christoph Lameter
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=4231E959.141F7D85@tv-sign.ru \
--to=oleg@tv-sign.ru \
--cc=Shai@Scalex86.org \
--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
Powered by JetHome