From: Michael Buesch <mb@bu3sch.de>
To: Andrew Morton <akpm@osdl.org>
Cc: linville@tuxdriver.com, jbenc@suse.cz, netdev@vger.kernel.org,
bcm43xx-dev@lists.berlios.de
Subject: Re: [PATCH] d80211: make sleeping in hw->config possible #2
Date: Tue, 11 Jul 2006 11:11:27 +0200 [thread overview]
Message-ID: <200607111111.28040.mb@bu3sch.de> (raw)
In-Reply-To: <20060710212536.5a223977.akpm@osdl.org>
On Tuesday 11 July 2006 06:25, you wrote:
> On Tue, 11 Jul 2006 00:54:33 +0200
> Michael Buesch <mb@bu3sch.de> wrote:
>
> > Please apply this to wireless-dev.
> > Note that this is the second try to submit this patch.
> > The first try contained a little bug. I'm sorry for that.
> > If you already applied the first one, I can provide an incremental patch.
> >
> > Note2 that this patch depends on the
> > [PATCH] cancel_rearming_delayed_work infinite loop fix
> > I just sent out to the lists and akpm.
>
> Am still scratching my head over that. I wouldn't really call it a "fix".
> More an enhcancement to cover unanticipated (and arguably strange) usage.
>
> It's odd to call cancel_rearming_delayed_work() against a rearming
> workqueue which isn't actually running. It tends to indicate that the
> caller has lost track of what it's up to.
No, I don't think so.
Let's say we have the following scenario:
A wq reschedules itself x times after it was scheduled once from outside.
After these x times, it does not reschedule anymore. That's what happens
in d80211. And I don't see a solution to sync this, other than modifying
the function, because we may call it after the x reschedule times.
Or do you think we should really do a statemachine to workaround it?
I am not the first one to hit this (I call it) bug.
It is _very_ confusing to see this sync function blocking forever.
I saw several people complaining about it. Also on #kernelnewbies.
> But as a convenience thing I guess it's an OK thing to do. I need to stare
> at the implementation for a bit longer - that stuff's tricky.
Actually, I think there's still a little race.
I will send a more complex fix for this, if you agree to change the function.
If you say "no, we don't fix this. Insert a statemachine or something in your
code instead", I can use the time for better things. :)
But I think the following is also broken in the old code:
A wq is not pending anymore, but just executing (before it reschedules itself).
I think that would also loop forever. I don't think that's what we want.
Because we can't really keep track of _this_.
--
Greetings Michael.
next prev parent reply other threads:[~2006-07-11 9:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-10 22:54 [PATCH] d80211: make sleeping in hw->config possible #2 Michael Buesch
2006-07-11 4:25 ` Andrew Morton
2006-07-11 9:11 ` Michael Buesch [this message]
2006-07-11 9:31 ` Andrew Morton
2006-07-11 10:12 ` Michael Buesch
2006-07-12 16:53 ` Jiri Benc
2006-07-12 20:34 ` Michael Buesch
2006-07-18 16:57 ` [RFC, RFT] " Jiri Benc
[not found] ` <20060718185711.21aaf55b-IhiK2ZEFs2oCVLCxKZUutA@public.gmane.org>
2006-07-18 17:36 ` Michael Buesch
2006-07-18 17:58 ` Michael Buesch
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=200607111111.28040.mb@bu3sch.de \
--to=mb@bu3sch.de \
--cc=akpm@osdl.org \
--cc=bcm43xx-dev@lists.berlios.de \
--cc=jbenc@suse.cz \
--cc=linville@tuxdriver.com \
--cc=netdev@vger.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;
as well as URLs for NNTP newsgroup(s).