From: Thomas Gleixner <tglx@linutronix.de>
To: Tejun Heo <tj@kernel.org>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1 V2] workqueue: remove the del_timer_sync()s in maybe_create_worker()
Date: Mon, 14 Jul 2014 17:33:06 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.10.1407141731240.24854@nanos> (raw)
In-Reply-To: <20140714142707.GB31610@htj.dyndns.org>
On Mon, 14 Jul 2014, Tejun Heo wrote:
> Hello,
>
> On Mon, Jul 14, 2014 at 04:13:21PM +0800, Lai Jiangshan wrote:
> > It is said in the document that the timer which is being
> > deleted by del_timer_sync() should not be restarted:
> > Synchronization rules: Callers must prevent restarting of
> > the timer, otherwise this function is meaningless.
> >
> > Repeating timer may cause the del_timer_sync() spin longer,
> > or even spin forever in very very very very extreme condition.
>
> I'm fairly sure del_timer_sync() can delete self-requeueing timers.
> The implementation busy-waits if the queued timer is the currently
> executing one and dequeues only while the timer isn't running which
> should be able to handle self-requeueing ones just fine. Thomas,
> del_timer_sync() can reliably delete self-requeueing ones, right?
Yes. If the timer callback is running on the other cpu, then it waits
for the callback to finish before checking whether the timer is
enqueued or not.
Thanks,
tglx
next prev parent reply other threads:[~2014-07-14 15:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-13 15:31 [PATCH] " Lai Jiangshan
2014-07-14 8:13 ` [PATCH 0/1 V2] workqueue: a tiny fix for the mayday timer Lai Jiangshan
2014-07-14 8:13 ` [PATCH 1/1 V2] workqueue: remove the del_timer_sync()s in maybe_create_worker() Lai Jiangshan
2014-07-14 14:27 ` Tejun Heo
2014-07-14 15:33 ` Thomas Gleixner [this message]
2014-07-14 21:18 ` Lai Jiangshan
2014-07-14 21:42 ` Thomas Gleixner
2014-07-15 0:22 ` Lai Jiangshan
2014-07-16 1:24 ` Lai Jiangshan
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=alpine.DEB.2.10.1407141731240.24854@nanos \
--to=tglx@linutronix.de \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
/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®