Re: Netconsole violates dev->hard_start_xmit synch rules

2005-09-07 Thread David S. Miller
From: Francois Romieu <[EMAIL PROTECTED]> Date: Wed, 7 Sep 2005 20:59:49 +0200 > Stephen Hemminger <[EMAIL PROTECTED]> : > [...] > > It really sounds like netconsole needs to have a different device hook > > instead of start_xmit. It also probably doesn't want to have allocate > > an skb. What y

Re: Netconsole violates dev->hard_start_xmit synch rules

2005-09-07 Thread David S. Miller
From: Matt Mackall <[EMAIL PROTECTED]> Date: Wed, 7 Sep 2005 10:04:29 -0700 > Netpoll is intended to be a replacement for the requirement of serial > cables for doing things like tricky oops capture and kgdb. > > If we move to softirq-only processing, it will not be a serial cable > replacement.

Re: Netconsole violates dev->hard_start_xmit synch rules

2005-09-07 Thread Matt Mackall
On Wed, Sep 07, 2005 at 12:17:01PM -0700, Ben Greear wrote: > Francois Romieu wrote: > >Stephen Hemminger <[EMAIL PROTECTED]> : > >[...] > > > >>It really sounds like netconsole needs to have a different device hook > >>instead of start_xmit. It also probably doesn't want to have allocate > >>an s

Re: Netconsole violates dev->hard_start_xmit synch rules

2005-09-07 Thread Ben Greear
Francois Romieu wrote: Stephen Hemminger <[EMAIL PROTECTED]> : [...] It really sounds like netconsole needs to have a different device hook instead of start_xmit. It also probably doesn't want to have allocate an skb. What you want is a synchronous way to send one packet with interrupts disab

Re: Netconsole violates dev->hard_start_xmit synch rules

2005-09-07 Thread Francois Romieu
Stephen Hemminger <[EMAIL PROTECTED]> : [...] > It really sounds like netconsole needs to have a different device hook > instead of start_xmit. It also probably doesn't want to have allocate > an skb. What you want is a synchronous way to send one packet with > interrupts disabled: > > (de

Re: Netconsole violates dev->hard_start_xmit synch rules

2005-09-07 Thread Matt Mackall
On Wed, Sep 07, 2005 at 11:19:42AM -0700, Stephen Hemminger wrote: > On Wed, 7 Sep 2005 10:19:33 -0700 > Matt Mackall <[EMAIL PROTECTED]> wrote: > > > On Tue, Sep 06, 2005 at 09:02:42PM -0700, Eugene Surovegin wrote: > > > I don't quite understand, you _already_ have deferred processing in > > >

Re: Netconsole violates dev->hard_start_xmit synch rules

2005-09-07 Thread Stephen Hemminger
On Wed, 7 Sep 2005 10:19:33 -0700 Matt Mackall <[EMAIL PROTECTED]> wrote: > On Tue, Sep 06, 2005 at 09:02:42PM -0700, Eugene Surovegin wrote: > > I don't quite understand, you _already_ have deferred processing in > > netpoll (btw, how good this will work with kgdboe?). > > Yes, it exists as a l

Re: Netconsole violates dev->hard_start_xmit synch rules

2005-09-07 Thread Patrick McHardy
Matt Mackall wrote: > On Wed, Sep 07, 2005 at 07:16:03PM +0200, Patrick McHardy wrote: > >>Not sure if its possible, but perhaps you could register the panic >>notifier to do whatever is necessary to get an oops out. > > > It's not really just about oopses. > > Consider the case of: > >

Re: Netconsole violates dev->hard_start_xmit synch rules

2005-09-07 Thread Matt Mackall
On Wed, Sep 07, 2005 at 07:16:03PM +0200, Patrick McHardy wrote: > Matt Mackall wrote: > > If we move to softirq-only processing, it will not be a serial cable > > replacement. It won't capture the tricky oopses you normally need a > > serial cable for and it won't work with kgdb. It will be an awk

Re: Netconsole violates dev->hard_start_xmit synch rules

2005-09-07 Thread Matt Mackall
On Tue, Sep 06, 2005 at 09:02:42PM -0700, Eugene Surovegin wrote: > I don't quite understand, you _already_ have deferred processing in > netpoll (btw, how good this will work with kgdboe?). Yes, it exists as a last ditch fallback for cases where we can detect deadlock. And it works not at all fo

Re: Netconsole violates dev->hard_start_xmit synch rules

2005-09-07 Thread Patrick McHardy
Matt Mackall wrote: > If we move to softirq-only processing, it will not be a serial cable > replacement. It won't capture the tricky oopses you normally need a > serial cable for and it won't work with kgdb. It will be an awkward > syslogd and nothing more. I won't have any use for it and I suspec

Re: Netconsole violates dev->hard_start_xmit synch rules

2005-09-07 Thread Matt Mackall
On Tue, Sep 06, 2005 at 08:42:39PM -0700, David S. Miller wrote: > You'll need to find a way to do netpoll without disabling hw IRQs > during these driver methods. Then netpoll would be universally > usable, as it would even work with drivers which are software tunnels > and which feed packets bac

Re: Netconsole violates dev->hard_start_xmit synch rules

2005-09-06 Thread Eugene Surovegin
On Tue, Sep 06, 2005 at 08:49:35PM -0700, Matt Mackall wrote: > On Tue, Sep 06, 2005 at 08:37:36PM -0700, Eugene Surovegin wrote: > > On Tue, Sep 06, 2005 at 08:22:25PM -0700, Matt Mackall wrote: > > > Which would I rather have: > > > > > > "netconsole never catches my oopses, it's useless." > >

Re: Netconsole violates dev->hard_start_xmit synch rules

2005-09-06 Thread Matt Mackall
On Tue, Sep 06, 2005 at 08:37:36PM -0700, Eugene Surovegin wrote: > On Tue, Sep 06, 2005 at 08:22:25PM -0700, Matt Mackall wrote: > > Which would I rather have: > > > > "netconsole never catches my oopses, it's useless." > > > > "netconsole didn't work with my driver, so I tried another card and

Re: Netconsole violates dev->hard_start_xmit synch rules

2005-09-06 Thread Eugene Surovegin
On Tue, Sep 06, 2005 at 08:35:32PM -0700, Matt Mackall wrote: > On Tue, Sep 06, 2005 at 08:19:34PM -0700, David S. Miller wrote: > > From: Matt Mackall <[EMAIL PROTECTED]> > > Date: Tue, 6 Sep 2005 20:08:10 -0700 > > > > > Think upon the kgdb-over-ethernet case, please. The kernel hits a > > > bre

Re: Netconsole violates dev->hard_start_xmit synch rules

2005-09-06 Thread David S. Miller
From: Matt Mackall <[EMAIL PROTECTED]> Date: Tue, 6 Sep 2005 20:35:32 -0700 > Kgdboe simply wants the asynchronous subsystem to get out of the > way. For most cards, it works just fine. It wants to impose a locking model restriction which never ever existed in the past. As I said, I myself even

Re: Netconsole violates dev->hard_start_xmit synch rules

2005-09-06 Thread Eugene Surovegin
On Tue, Sep 06, 2005 at 08:22:25PM -0700, Matt Mackall wrote: > Which would I rather have: > > "netconsole never catches my oopses, it's useless." > > "netconsole didn't work with my driver, so I tried another card and it > works great." Well, not all world which uses Linux is PC with PCI slots

Re: Netconsole violates dev->hard_start_xmit synch rules

2005-09-06 Thread Matt Mackall
On Tue, Sep 06, 2005 at 08:19:34PM -0700, David S. Miller wrote: > From: Matt Mackall <[EMAIL PROTECTED]> > Date: Tue, 6 Sep 2005 20:08:10 -0700 > > > Think upon the kgdb-over-ethernet case, please. The kernel hits a > > breakpoint, the kgdb stub stops everything, sends a packet to the > > debuggi

Re: Netconsole violates dev->hard_start_xmit synch rules

2005-09-06 Thread Matt Mackall
On Tue, Sep 06, 2005 at 07:32:38PM -0700, Eugene Surovegin wrote: > On Tue, Sep 06, 2005 at 07:19:21PM -0700, Matt Mackall wrote: > > > or a') make this a per-driver feature (e.g. NETIF_F_NETPOLL_CHALENGED) > > > > > > In this case, even if driver cannot handle being called from IRQ > > > context

Re: Netconsole violates dev->hard_start_xmit synch rules

2005-09-06 Thread David S. Miller
From: Matt Mackall <[EMAIL PROTECTED]> Date: Tue, 6 Sep 2005 20:08:10 -0700 > Think upon the kgdb-over-ethernet case, please. The kernel hits a > breakpoint, the kgdb stub stops everything, sends a packet to the > debugging client, waits for a packet back.. This simply can't work if > we delay sen

Re: Netconsole violates dev->hard_start_xmit synch rules

2005-09-06 Thread Matt Mackall
On Tue, Sep 06, 2005 at 07:37:45PM -0700, David S. Miller wrote: > From: Matt Mackall <[EMAIL PROTECTED]> > Date: Tue, 6 Sep 2005 18:03:38 -0700 > > > Option c) is obviously a big project but maybe we can get from here to > > there. One possible step in that direction would be exposing a > > stand

Re: Netconsole violates dev->hard_start_xmit synch rules

2005-09-06 Thread David S. Miller
From: Matt Mackall <[EMAIL PROTECTED]> Date: Tue, 6 Sep 2005 18:03:38 -0700 > Option c) is obviously a big project but maybe we can get from here to > there. One possible step in that direction would be exposing a > standard driver lock that netpoll can see and switching drivers that > have troubl

Re: Netconsole violates dev->hard_start_xmit synch rules

2005-09-06 Thread Eugene Surovegin
On Tue, Sep 06, 2005 at 07:19:21PM -0700, Matt Mackall wrote: > > or a') make this a per-driver feature (e.g. NETIF_F_NETPOLL_CHALENGED) > > > > In this case, even if driver cannot handle being called from IRQ > > context, netconsole still can be used, although in a little more > > limited fashi

Re: Netconsole violates dev->hard_start_xmit synch rules

2005-09-06 Thread Matt Mackall
On Tue, Sep 06, 2005 at 06:37:40PM -0700, Eugene Surovegin wrote: > On Tue, Sep 06, 2005 at 06:03:38PM -0700, Matt Mackall wrote: > > On Tue, Sep 06, 2005 at 04:01:24PM -0700, David S. Miller wrote: > > > So you cannot call into these drivers with HW interrupts disabled or > > > even worse from HW

Re: Netconsole violates dev->hard_start_xmit synch rules

2005-09-06 Thread Eugene Surovegin
On Tue, Sep 06, 2005 at 06:03:38PM -0700, Matt Mackall wrote: > On Tue, Sep 06, 2005 at 04:01:24PM -0700, David S. Miller wrote: > > So you cannot call into these drivers with HW interrupts disabled or > > even worse from HW interrupt context. These drivers use locking > > strategies which are per

Re: Netconsole violates dev->hard_start_xmit synch rules

2005-09-06 Thread Matt Mackall
On Tue, Sep 06, 2005 at 04:01:24PM -0700, David S. Miller wrote: > So you cannot call into these drivers with HW interrupts disabled or > even worse from HW interrupt context. These drivers use locking > strategies which are perfectly legal and work until you add netpoll. And again, I agree. Wha

Re: Netconsole violates dev->hard_start_xmit synch rules

2005-09-06 Thread David S. Miller
From: Matt Mackall <[EMAIL PROTECTED]> Date: Tue, 6 Sep 2005 15:50:25 -0700 > > So we try to spit out netconsole messages in hw IRQ context and stuff > > like that, as you stated. The tg3 driver is susceptible to the > > problem you mention, as is bnx2, because they use purely software > > interr

Re: Netconsole violates dev->hard_start_xmit synch rules

2005-09-06 Thread Matt Mackall
On Tue, Sep 06, 2005 at 03:42:07PM -0700, David S. Miller wrote: > Mentioning the latency of the serial console, in support of > netpoll's interrupt disabling, is quite a straw man. No, it's exactly to the point: latency is a secondary concern when we're printing an oops or other diagnostic. Other

Re: Netconsole violates dev->hard_start_xmit synch rules

2005-09-06 Thread Matt Mackall
On Tue, Sep 06, 2005 at 03:36:27PM -0700, David S. Miller wrote: > From: Eugene Surovegin <[EMAIL PROTECTED]> > Date: Tue, 6 Sep 2005 15:04:17 -0700 > > > David, correct me if I'm wrong, but I think there is a major problem > > with current netconsole/netpoll approach. > > You're preaching to the

Re: Netconsole violates dev->hard_start_xmit synch rules

2005-09-06 Thread David S. Miller
From: Matt Mackall <[EMAIL PROTECTED]> Date: Tue, 6 Sep 2005 15:32:50 -0700 > Unfortunately, netpoll fundamentally requires everything to work with > interrupts off. This can't be changed. It could be called from the > context of an oops, or worse, by the kgdb stub at a breakpoint. If > drivers re

Re: Netconsole violates dev->hard_start_xmit synch rules

2005-09-06 Thread Eugene Surovegin
On Tue, Sep 06, 2005 at 03:36:27PM -0700, David S. Miller wrote: > From: Eugene Surovegin <[EMAIL PROTECTED]> > Date: Tue, 6 Sep 2005 15:04:17 -0700 > > > David, correct me if I'm wrong, but I think there is a major problem > > with current netconsole/netpoll approach. > > You're preaching to the

Re: Netconsole violates dev->hard_start_xmit synch rules

2005-09-06 Thread David S. Miller
From: Eugene Surovegin <[EMAIL PROTECTED]> Date: Tue, 6 Sep 2005 15:04:17 -0700 > David, correct me if I'm wrong, but I think there is a major problem > with current netconsole/netpoll approach. You're preaching to the choir. I think the whole netpoll implementation is fundamentally flawed, and

Re: Netconsole violates dev->hard_start_xmit synch rules

2005-09-06 Thread Matt Mackall
On Tue, Sep 06, 2005 at 02:47:14PM -0700, David S. Miller wrote: > From: Eugene Surovegin <[EMAIL PROTECTED]> > Date: Tue, 6 Sep 2005 00:40:01 -0700 > > > According to Documentation/networking/netdevices.txt > > dev->hard_start_xmit must be called with interrupts *enabled*. > > > > Unfortunately

Re: Netconsole violates dev->hard_start_xmit synch rules

2005-09-06 Thread Eugene Surovegin
On Tue, Sep 06, 2005 at 02:47:14PM -0700, David S. Miller wrote: > From: Eugene Surovegin <[EMAIL PROTECTED]> > Date: Tue, 6 Sep 2005 00:40:01 -0700 > > > According to Documentation/networking/netdevices.txt > > dev->hard_start_xmit must be called with interrupts *enabled*. > > > > Unfortunately

Re: Netconsole violates dev->hard_start_xmit synch rules

2005-09-06 Thread David S. Miller
From: Eugene Surovegin <[EMAIL PROTECTED]> Date: Tue, 6 Sep 2005 00:40:01 -0700 > According to Documentation/networking/netdevices.txt > dev->hard_start_xmit must be called with interrupts *enabled*. > > Unfortunately, current netconsole code always calls netpoll with local > interrupts disable