From: Jarek Poplawski <jarkao2@o2.pl>
To: "Maciej W\. Rozycki" <macro@linux-mips.org>
Cc: Andy Fleming <afleming@freescale.com>,
Andrew Morton <akpm@linux-foundation.org>,
Jeff Garzik <jgarzik@pobox.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PHYLIB: IRQ event workqueue handling fixes
Date: Thu, 18 Oct 2007 08:31:57 +0200 [thread overview]
Message-ID: <20071018063157.GA1694@ff.dom.local> (raw)
In-Reply-To: <20071017085809.GA1658@ff.dom.local>
On Wed, Oct 17, 2007 at 10:58:09AM +0200, Jarek Poplawski wrote:
...
> 8) phy_stop_interrupts(): I'm not sure this additional call from
> DEBUG_SHIRQ should be so dangerous, eg.:
>
> /*
> * status == PHY_HALTED &&
> * interrupts are stopped after phy_stop()
> */
> if (cancel_work_sync(...))
> enable_irq();
>
> free_irq(...);
> /*
> * possible schedule_work() from DEBUG_SHIRQ only,
> * but proper check for PHY_HALTED is done;
> * so, let's flush after this too:
> */
> cancel_work_sync();
After rethinking, it looks like this last cancel should be useless.
So, if phy_interrupt() schedules only if !PHY_HALTED and phy_change()
does enable_irq() with no exeptions, it seems phy_interrupt() even
without lock must see PHY_HALTED state before this free_irq() with
possible DEBUG_SHIRQ call, then maybe only this safety:
WARN_ON(work_pending(&phydev->phy_queue));
Btw, I've read this was considered and not liked, but IMHO, if this
really has to be like this, creating phy's own workqueue seems to be
resonable, at the very least to reduce latencies to other users of
this irq.
Jarek P.
next prev parent reply other threads:[~2007-10-18 6:29 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-19 14:38 [PATCH] PHYLIB: IRQ event workqueue handling fixes Maciej W. Rozycki
2007-09-20 23:53 ` Andrew Morton
2007-09-21 12:51 ` Maciej W. Rozycki
2007-09-21 18:42 ` Andrew Morton
2007-10-15 12:53 ` Jarek Poplawski
2007-10-15 17:03 ` Maciej W. Rozycki
2007-10-16 6:21 ` Jarek Poplawski
2007-10-16 17:19 ` Maciej W. Rozycki
2007-10-17 8:58 ` Jarek Poplawski
2007-10-17 9:08 ` Benjamin Herrenschmidt
2007-10-17 9:09 ` Jarek Poplawski
2007-10-18 6:31 ` Jarek Poplawski [this message]
2007-10-18 7:05 ` [PATCH] flush_work_sync vs. flush_scheduled_work " Jarek Poplawski
2007-10-18 15:48 ` Oleg Nesterov
2007-10-18 15:58 ` Maciej W. Rozycki
2007-10-19 7:50 ` Jarek Poplawski
2007-10-19 8:01 ` Jarek Poplawski
2007-10-22 6:11 ` Jarek Poplawski
2007-10-22 18:02 ` Oleg Nesterov
2007-10-23 6:59 ` Jarek Poplawski
2007-10-23 9:21 ` Jarek Poplawski
2007-10-19 8:00 ` Johannes Berg
2007-10-18 11:37 ` Maciej W. Rozycki
2007-10-18 11:30 ` Maciej W. Rozycki
2007-10-18 14:37 ` Jarek Poplawski
2007-10-18 15:31 ` Maciej W. Rozycki
2007-10-19 8:17 ` Jarek Poplawski
2007-10-19 12:57 ` Maciej W. Rozycki
2007-10-19 11:38 ` Maciej W. Rozycki
2007-10-19 14:39 ` Jarek Poplawski
2007-10-19 17:58 ` Maciej W. Rozycki
2007-10-19 21:46 ` Benjamin Herrenschmidt
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=20071018063157.GA1694@ff.dom.local \
--to=jarkao2@o2.pl \
--cc=afleming@freescale.com \
--cc=akpm@linux-foundation.org \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=macro@linux-mips.org \
--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