Subject: Re: [BUG] New Kernel Bugs

From: Mark Lord <[email-masked]>
Date: Tue, 13 Nov 2007 12:47:51 -0500

Thomas Gleixner wrote:
> On Tue, 13 Nov 2007, Mark Lord wrote:
..
>> I *still* get very slow resume-from-RAM quite often here
>> (new in 2.6.23 kernel, wasn't there in early 2.6.23-rc*).
..
>> Something eventually times out after a minute or so
>> and it comes back.  Cannot make it happen reliably,
>> unless I'm in a hurry to get something done.  :)
>> I suspect USB here, probably the same loopy bug that
>> we added a "loop limit failsafe" for back in 2.6.21(?).
> 
> Do you have a pointer to that please ?
..

The "limit" added in the code below,
which was for messages of this form:

    hub 1-1:1.0: hub_port_status failed (err = -71)
    last message repeated 347 times

drivers/usb/hub.c:  
> static void hub_tt_kevent (struct work_struct *work)
> {
>         struct usb_hub          *hub =
>                 container_of(work, struct usb_hub, tt.kevent);
>         unsigned long           flags;
>         int                     limit = 100;
> 
>         spin_lock_irqsave (&hub->tt.lock, flags);
>         while (--limit && !list_empty (&hub->tt.clear_list)) {
>             ...

I'm not yet sure what's happening on resume now,
but there's this huge long pause with a dark screen
and then suddenly the USB subsystem comes to life
(my mouse lights up) and the system finally resumes.

More when I know more.  But it doesn't happen every time,
or even most times, so git-bisect is not possible either.

This one actually requires a developer/maintainer to put
in some effort and think about things.  Currently, that's me.

-ml