netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Neukum <oneukum@suse.de>
To: Elly Jones <ellyjones@google.com>
Cc: Alan Stern <stern@rowland.harvard.edu>,
	David Miller <davem@davemloft.net>,
	netdev@vger.kernel.org, USB list <linux-usb@vger.kernel.org>
Subject: Re: [patch] usbnet: fix 100% CPU use on suspended device
Date: Wed, 4 Aug 2010 16:08:51 +0200	[thread overview]
Message-ID: <201008041608.51227.oneukum@suse.de> (raw)
In-Reply-To: <AANLkTim-6VhV7AD_QQh-5j5RqxEDDh1oyX4CqZWGb-ZH@mail.gmail.com>

Am Mittwoch, 4. August 2010, 16:04:48 schrieben Sie:
> On Tue, Aug 3, 2010 at 10:39 AM, Oliver Neukum <oliver@neukum.org> wrote:
> > Am Montag, 2. August 2010, 15:31:33 schrieb Elly Jones:
> >> On Mon, Jul 26, 2010 at 12:21 PM, Oliver Neukum <oliver@neukum.org> wrote:
> >> > Am Montag, 26. Juli 2010, 17:13:23 schrieb Alan Stern:
> >> >> On Mon, 26 Jul 2010, Elly Jones wrote:
> >> >>
> >> >> > > This isn't right.  The problem should be fixed some other way.  Under
> >> >> > > what circumstances are URBs submitted incorrectly?
> >> >> >
> >> >> > When the device is autosuspended. What is the proper thing for a
> >> >> > device to do here?
> >> >>
> >> >> From looking at the code, it appears that the EVENT_DEV_ASLEEP flag
> >> >> should be tested in usbnet_bh() the way it is in rx_submit().  But I'm
> >> >> not an expert on usbnet; we should ask someone who is, like Oliver.
> >> >
> >> > Sorry, I didn't notice this thread.
> >> >
> >> > The correct way to check for autosuspend in usbnet is to look
> >> > at EVENT_DEV_ASLEEP under txq.lock. That being said, usbnet_bh()
> >> > uses rx_submit() which does the correct check. The bug seems to be
> >> > a lack of error handling in usbnet_bh() regarding the return of rx_submit()
> >>
> >> If rx_submit() fails, should usbnet_bh() just not tasklet_schedule() itself?
> >
> > That would not work unless the cause of the failure would be removed.
> > If you get -ENOLINK the sane option seems to me to give up.
> 
> 'Give up' meaning what? If we reschedule the tasklet, it'll just try
> again (and fail again), won't it?

Yes, exactly. If the tasklet runs after the interface has been suspended,
it cannot replenish the rx URBs. That will be the job of resume()
Just stop trying and do nothing.

	Regards
		Oliver

      reply	other threads:[~2010-08-04 14:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-21 18:51 [patch] usbnet: fix 100% CPU use on suspended device Elly Jones
     [not found] ` <AANLkTi=pSkOuiFGAK4inPdm-KbLuVrz51e2T6eV51ts0-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-07-26  4:57   ` David Miller
     [not found]     ` <20100725.215739.183063953.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2010-07-26 13:26       ` Elly Jones
2010-07-26 14:36         ` Alan Stern
     [not found]           ` <Pine.LNX.4.44L0.1007261033090.1550-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2010-07-26 14:47             ` Elly Jones
2010-07-26 15:13               ` Alan Stern
     [not found]                 ` <Pine.LNX.4.44L0.1007261106350.1550-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2010-07-26 16:21                   ` Oliver Neukum
     [not found]                     ` <201007261821.15020.oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org>
2010-08-02 13:31                       ` Elly Jones
     [not found]                         ` <AANLkTi=KbThErL-jXXSVGdkod-p7B7u6eDL5LtnU5SG--JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-08-03 14:39                           ` Oliver Neukum
     [not found]                             ` <201008031639.24874.oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org>
2010-08-04 14:04                               ` Elly Jones
2010-08-04 14:08                                 ` Oliver Neukum [this message]

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=201008041608.51227.oneukum@suse.de \
    --to=oneukum@suse.de \
    --cc=davem@davemloft.net \
    --cc=ellyjones@google.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /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).