lkml.org 
[lkml]   [2009]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [GIT PULL] PM updates for 2.6.33
On Sun, Dec 06, 2009 at 09:31:12PM -0800, Arjan van de Ven wrote:
> On Sun, 6 Dec 2009 18:27:07 -0800
> Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:
>
> > On Sun, Dec 06, 2009 at 05:18:56PM -0800, Arjan van de Ven wrote:
> > > On Sun, 6 Dec 2009 14:54:48 -0800
> > > Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:
> > >
> > > > Yes, that's your PS/2 mouse (rather touchpad) and the delay comes
> > > > from device reset (needed by some keyboard controllers - I
> > > > remember HP -or it and keyboard will be dead at resume).
> > > >
> > >
> > > btw could we do this reset in an async function call (as long as we
> > > wait for it to complete before we pull the plug finally) ?
> >
> > It has to complete before we start shutting down i8042, so there are
> > dependencies involved...
>
> async function calls have 2 methods for synchronization:
>
> * inside an async function, you can wait for all "earlier" async
> functions to complete (async_synchronize_cookie)
> * outside an async function, you can wait for all scheduled async
> functions to complete (async_synchronize_full)
>
> so there's two options to use the async code to cut down this time:
>
> 1) Make both the mouse, keyboard AND the i8042 suspend functions async,
> and in the i8042 function the code first synchronizes on all previous
> async work
> 2) only make the mouse and keyboard suspend async, and just wait for all
> async work in i8042 suspend
>
> I strongly prefer number 1, in terms of getting the best suspend speed.
> It means that all other suspend code can run in parallel to the whole
> serio/i8042 suspend.
> Option two is simpler, but the delay is in the normal, synchronous path,
> so other suspend code will not run in parallel.
>
> The good news is that neither is hard for someone familiar with the
> code...
>

And the bad thing is that violates multiple layers in the kernel. Atkbd
driver does not have to be using i8042; neither does psmouse. Althtough
they do in 99% of the cases there are other controllers providing the
i8042-style ports. Just grep for SERIO_8042 in drivers/input/serio.

I do not want to hard-code the i8042-psmouse-atkbd dependency.

--
Dmitry


\
 
 \ /
  Last update: 2009-12-07 07:17    [W:0.175 / U:1.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site