Thread (2 messages) flat view 2 messages, 2 authors, 2012-09-04

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

From: Ming Lei <hidden>
Date: 2012-09-04 09:38:36

On Tue, Sep 4, 2012 at 3:49 PM, Bjørn Mork [off-list ref] 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.
quoted
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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help