[lkml]   [2009]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 2/4]: CPUIDLE: Introduce architecture independent cpuidle_pm_idle in drivers/cpuidle/cpuidle.c
    On Fri, 2009-08-28 at 08:48 +0200, Peter Zijlstra wrote:
    > > void cpuidle_install_idle_handler(void)
    > > {
    > > .........
    > > .........
    > > cpuidle_pm_idle = cpuidle_idle_call;
    > > }
    > All I'm seeing here is a frigging mess.
    > How on earths can something called: cpuidle_install_idle_handler() have
    > a void argument, _WHAT_ handler is it going to install?

    Argh, now I see, it installs itself as the platform idle handler.

    so cpuidle_install_idle_handler() pokes at the unmanaged pm_idle pointer
    to make cpuidle take control.

    On module load it does:

    pm_idle_old = pm_idle;

    then in the actual idle loop it does:

    if (!dev || !dev->enabled) {
    if (pm_idle_old)

    who is to say that the pointer stored at module init time is still
    around at that time?

    So cpuidle recognised the pm_idle stuff was a flaky, but instead of
    fixing it, they build a whole new layer on top of it. Brilliant.

    /me goes mark this whole thread read, I've got enough things to do.

     \ /
      Last update: 2009-08-28 09:05    [W:0.025 / U:203.000 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site