lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAHu9=sPEDuC-nQqP4Xe-_vLXz3FFGpkzSnCMCdJcUbmT+choeQ@mail.gmail.com>
Date:	Tue, 5 Aug 2014 14:55:23 +0600
From:	Mohammad Merajul Islam Molla <meraj.enigma@...il.com>
To:	linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [Query] cpuidle functions cpuidle_install_idle_handler/cpuidle_uninstall_idle_handler

ping!

Since its been a while. Anyone has any comment on this? Should I go
ahead submit a patch?

--
Thanks,
-Meraj


On Thu, Jul 24, 2014 at 9:35 PM, Mohammad Merajul Islam Molla
<meraj.enigma@...il.com> wrote:
> Hi
>
> In drivers/cpuidle/cpuidle.c, there are two functions
> cpuidle_install_idle_handler & cpuidle_uninstall_idle_handler.
> The names seem confusing to me as they don't install any handler,
> rather set 'initialized'  variable to 1/0.
>
> In kernel version 3.0, these functions used to look as below where
> they installed and uninstalled some handler function (pm_idle) -
>
> void cpuidle_install_idle_handler(void)
>  {
>         if (enabled_devices && (pm_idle != cpuidle_idle_call)) {
>                  /* Make sure all changes finished before we switch
> to new idle */
>                  smp_wmb();
>                  pm_idle = cpuidle_idle_call;
>           }
>  }
>
> void cpuidle_uninstall_idle_handler(void)
>  {
>          if (enabled_devices && pm_idle_old && (pm_idle != pm_idle_old)) {
>                  pm_idle = pm_idle_old;
>                  cpuidle_kick_cpus();
>          }
>  }
>
> In recent kernel (3.16.0-rc6) , the code for the two mentioned
> functions looks as below -
>
> /**
>  * cpuidle_install_idle_handler - installs the cpuidle idle loop handler
>  */
> void cpuidle_install_idle_handler(void)
> {
>         if (enabled_devices) {
>                 /* Make sure all changes finished before we switch to
> new idle */
>                 smp_wmb();
>                 initialized = 1;
>         }
> }
>
> /**
>  * cpuidle_uninstall_idle_handler - uninstalls the cpuidle idle loop
> handler
>  */
> void cpuidle_uninstall_idle_handler(void)
> {
>         if (enabled_devices) {
>                 initialized = 0;
>                 kick_all_cpus_sync();
>         }
> }
>
> There is no idle handler (pm_idle) installed/uninstalled anymore.
>
> So should these functions be renamed now to something -
> cpuidle_initialize()/cpuidle_uninitialize()?  Also, the comments
> should be removed?
>
>
> --
> Thanks,
> -Meraj
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ