From: Thomas Gleixner <tglx@linutronix.de>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu,
Oleg Nesterov <oleg@tv-sign.ru>
Subject: Re: [patch 2/2] hrtimer
Date: Mon, 27 Mar 2006 00:10:16 +0200 [thread overview]
Message-ID: <1143411016.5344.139.camel@localhost.localdomain> (raw)
In-Reply-To: <20060325183213.63ab667c.akpm@osdl.org>
On Sat, 2006-03-25 at 18:32 -0800, Andrew Morton wrote:
> This all looks vaguely racy. hrtimer_wakeup() will set t->task to NULL
> without barriers, locks or anything. And the waiter here can break out of
> schedule() due to signal delivery while a wakeup is in progress.
We set task = NULL before wake_up_process() which acts as a barrier.
> So the value of t->task here is fairly meaningless. Ot just depends on how
> far the waker has got through hrtimer_wakeup().
>
> Maybe that doesn't matter, because hrtimer_cancel() will spin until
> hrtimer_wakeup() has completed anyway, but could you please recheck and
> confirm that this is all solid?
Right, either it waits for the running timer or in case the wakeup
happens between
if (unlikely(t->task)) {
and
hrtimer_cancel(&t->timer);
then hrtimer_cancel will see that the timer is inactive and we drop out
of the loop because the while(t->task) condition is not longer true.
tglx
next prev parent reply other threads:[~2006-03-26 22:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-25 12:46 [patch 0/2] hrtimer: generic sleeper infrastructure Thomas Gleixner
2006-03-25 12:46 ` [patch 1/2] hrtimer Thomas Gleixner
2006-03-25 12:46 ` [patch 2/2] hrtimer Thomas Gleixner
2006-03-26 2:32 ` Andrew Morton
2006-03-26 22:10 ` Thomas Gleixner [this message]
2006-03-27 23:55 ` Oleg Nesterov
2006-03-28 0:03 ` Roman Zippel
2006-03-28 8:29 ` Thomas Gleixner
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=1143411016.5344.139.camel@localhost.localdomain \
--to=tglx@linutronix.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=oleg@tv-sign.ru \
/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