From: Jarek Poplawski <jarkao2@o2.pl>
To: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Ingo Molnar <mingo@elte.hu>,
linux-kernel@vger.kernel.org, David Howells <dhowells@redhat.com>
Subject: Re: Fw: [PATCH -mm] workqueue: debug possible endless loop in cancel_rearming_delayed_work
Date: Fri, 27 Apr 2007 11:03:39 +0200 [thread overview]
Message-ID: <20070427090338.GA2454@ff.dom.local> (raw)
In-Reply-To: <20070427075247.GB106@tv-sign.ru>
On Fri, Apr 27, 2007 at 11:52:47AM +0400, Oleg Nesterov wrote:
> On 04/27, Jarek Poplawski wrote:
...
> > > Sorry, can't understand. done == 0 means that the queueing in progress,
> > > this work should be placed on cwq->worklist very soon, most probably
> > > right after we drop cwq->lock.
> >
> > I think, theoretically, probably, maybe, there is possible some strange
> > case, this function gets spin_lock only when: list_empty(&work->entry) == 1
> > && _PENDING == 1 && del_timer(&dwork->timer) == 0.
>
> Yes, but this is not so strange, this means the queueing in progress. Most
> probably the "owner" of WORK_STRUCT_PENDING bit spins waiting for cwq->lock.
> We will retry in this case. Of course, if we have a workqueue with the single
> work which just re-arms itself via queue_work() (without delay) and does nothing
> more, we may need a lot of looping.
I've forgot most of the math already, but there is (probably)
some Parkinson's Law about it. So, by this strange case I
mean really lot of looping (something around infinity - quite
precisely).
>
> > PS: probably unusable, but for my own satisfaction:
> >
> > Acked-by: Jarek Poplawski <jarkao2@o2.pl>
>
> It is useable, at least for me. I hope you will re-ack when I actually send
This is even more strange...
BTW, I take a week of vacation (people here deserve to rest
from me), so let's say it's both acked and re-acked by me.
> the patch. Note that the "else" branch above doesn't need cwq->lock, and we
> should start with del_timer(), because the pending timer is the most common
> case.
I see, you've thought about it probably more than you said
so, I trust you 100% here (but will check later, anyway...).
Cheers,
Jarek P.
next prev parent reply other threads:[~2007-04-27 8:57 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20070419002548.72689f0e.akpm@linux-foundation.org>
[not found] ` <20070419102122.GA93@tv-sign.ru>
2007-04-20 9:22 ` Fw: [PATCH -mm] workqueue: debug possible endless loop in cancel_rearming_delayed_work Jarek Poplawski
2007-04-20 17:08 ` Oleg Nesterov
2007-04-23 9:00 ` Jarek Poplawski
2007-04-23 16:33 ` Oleg Nesterov
2007-04-24 11:53 ` Jarek Poplawski
2007-04-24 18:55 ` Oleg Nesterov
2007-04-25 6:12 ` Jarek Poplawski
2007-04-25 12:20 ` Jarek Poplawski
2007-04-25 12:28 ` Jarek Poplawski
2007-04-25 12:47 ` Oleg Nesterov
2007-04-25 14:47 ` Oleg Nesterov
2007-04-26 12:59 ` Jarek Poplawski
2007-04-26 16:34 ` Oleg Nesterov
2007-04-27 5:26 ` Jarek Poplawski
2007-04-27 7:52 ` Oleg Nesterov
2007-04-27 9:03 ` Jarek Poplawski [this message]
2007-04-26 13:13 ` Jarek Poplawski
2007-04-26 16:44 ` Oleg Nesterov
2007-04-27 5:52 ` 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=20070427090338.GA2454@ff.dom.local \
--to=jarkao2@o2.pl \
--cc=akpm@linux-foundation.org \
--cc=dhowells@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.