Re: [PATCH net] net: usbnet: fix softirq storm on suspend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 4, 2012 at 3:49 PM, Bjørn Mork <bjorn@xxxxxxx> wrote:
>
> That's easy:
>
> - Take any usbnet device supporting remote wakeup (and of course with a
>   minidriver supporting it as well),
> - enable autosuspend,
> - ip link set dev ethX/usbX/wwanX up
>
> And watch ksoftirqd/X use 100% of one of your CPU cores.
>
> I'd very much like to hear the details if you are unable to reproduce
> the bug using this simple test.

I have no such kind of devices, and can't reproduce the problem with
a cdc-ether gadget built by one omap3 beagleboard.

>> Once usbnet_terminate_urbs and netif_device_attach() are
>> completed, who will schedule tasklet to trigger rx_alloc_submit?
>
> That's a good question.  It sure would be nice if that never happened
> without waking the device first.  But there are just too many call sites
> for me to follow:

To be honest, your patch is correct, and I am just curious about
the reason why tasklet is scheduled after the device is suspended.

>
> bjorn@nemi:/usr/local/src/git/linux$ grep tasklet_schedule drivers/net/usb/usbnet.c
>                 tasklet_schedule(&dev->bh);
>  * but tasklet_schedule() doesn't.  hope the failure is rare.
>                         tasklet_schedule (&dev->bh);
>         tasklet_schedule(&dev->bh);
>                 tasklet_schedule(&dev->bh);
>         tasklet_schedule (&dev->bh);
>                         tasklet_schedule (&dev->bh);
>                                 tasklet_schedule (&dev->bh);
>         tasklet_schedule (&dev->bh);
>                                 tasklet_schedule (&dev->bh);
>                         tasklet_schedule (&dev->bh);

Could you add some debug info inside the caller to see which one
cause the tasklet to be scheduled?


Thanks,
--
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux