From: Jarek Poplawski <jarkao2@o2.pl>
To: Oleg Nesterov <oleg@tv-sign.ru>
Cc: David Chinner <dgc@sgi.com>,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH] workqueue: cancel_rearming_delayed_work/workqueue usage warning
Date: Mon, 23 Apr 2007 11:41:07 +0200 [thread overview]
Message-ID: <20070423094107.GD1684@ff.dom.local> (raw)
In-Reply-To: <20070420172348.GC470@tv-sign.ru>
On Fri, Apr 20, 2007 at 09:23:48PM +0400, Oleg Nesterov wrote:
> On 04/20, Jarek Poplawski wrote:
> >
> > Here is my proposal to make things clearer:
> > (this time on 2.6.21-rc7)
> >
> > CC: David Chinner <dgc@sgi.com>
> > CC: Oleg Nesterov <oleg@tv-sign.ru>
> > Signed-off-by: Jarek Poplawski <jarkao2@o2.pl>
> >
> > ---
> >
> > diff -Nurp 2.6.21-rc7-/kernel/workqueue.c 2.6.21-rc7/kernel/workqueue.c
> > --- 2.6.21-rc7-/kernel/workqueue.c 2007-04-18 10:14:16.000000000 +0200
> > +++ 2.6.21-rc7/kernel/workqueue.c 2007-04-20 13:56:51.000000000 +0200
> > @@ -662,6 +662,8 @@ EXPORT_SYMBOL(flush_scheduled_work);
> > * cancel_rearming_delayed_workqueue - reliably kill off a delayed work whose handler rearms the delayed work.
> > * @wq: the controlling workqueue structure
> > * @dwork: the delayed work struct
> > + *
> > + * WARNING: use only with handlers, which rearm unconditionally with delay > 0
> > */
>
> Nit: it is ok if the work re-arms itself with delay == 0 "sometimes". What we
> need is that the handler use delay > 0 eventually.
Probably it would be shorter to write it yourself, because I'm not sure
of your intentions: so, you think we can call this function with such
a work?
>
> I'd suggest to re-diff against -mm tree. I don't think this patch can find its
> way to the soon to be released 2.6.21.
The current thread seems to confirm my initial fear, this function
is not explained enough, so it should help to remove errors as soon
as possible from the current code. And I hope this functions will
work other way soon...
Jarek P.
next prev parent reply other threads:[~2007-04-23 9:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-19 6:54 [PATCH -mm] workqueue: debug possible endless loop in cancel_rearming_delayed_work Jarek Poplawski
2007-04-19 7:32 ` Ingo Molnar
2007-04-19 8:28 ` Jarek Poplawski
2007-04-19 14:48 ` David Chinner
2007-04-19 14:46 ` David Chinner
2007-04-20 8:13 ` Jarek Poplawski
2007-04-20 8:53 ` David Chinner
2007-04-20 10:21 ` Jarek Poplawski
2007-04-20 11:01 ` David Chinner
2007-04-20 12:12 ` [PATCH] workqueue: cancel_rearming_delayed_work/workqueue usage warning Jarek Poplawski
2007-04-20 17:23 ` Oleg Nesterov
2007-04-23 9:41 ` Jarek Poplawski [this message]
2007-04-19 17:07 ` [PATCH -mm] workqueue: debug possible endless loop in cancel_rearming_delayed_work Chuck Ebbert
2007-04-20 7:14 ` Jarek Poplawski
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=20070423094107.GD1684@ff.dom.local \
--to=jarkao2@o2.pl \
--cc=dgc@sgi.com \
--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