linaro-pm-wg team mailing list archive
-
linaro-pm-wg team
-
Mailing list archive
-
Message #00321
[Bug 1098343] Re: cpuidle - fix lock contention in the idle path
Fixed with commit ac34d7c8c87c247db0270285950753da045acaad
** Changed in: linaro-power-kernel
Importance: Undecided => High
** Changed in: linaro-power-kernel
Status: New => Fix Committed
--
You received this bug notification because you are a member of Linaro
Power Management Working Group, which is subscribed to Linaro PMWG
Kernel.
https://bugs.launchpad.net/bugs/1098343
Title:
cpuidle - fix lock contention in the idle path
Status in Kernel related development for Power Management Working Group:
Fix Committed
Bug description:
Commit bf4d1b5 (cpuidle: support multiple drivers) introduced
locking in cpuidle_get_cpu_driver(), which is used in the
idle_call() function.
This leads to a contention problem with a large number of CPUs,
because they all try to run the idle routine at the same time.
The lock can be safely removed because of how is used the cpuidle
API. Namely, cpuidle_register_driver() is called first, but the
cpuidle idle function is not entered before cpuidle_register_device()
is called, because the cpuidle device is not enabled then. Moreover,
cpuidle_unregister_driver(), which would reset the driver value to
NULL, is not called before cpuidle_unregister_device().
All of the cpuidle drivers use the API in the same way.
In general, a cleanup around the lock is necessary and a proper
refcounting mechanism should be used to ensure the consistency in the
API (for example, cpuidle_unregister_driver() should fail if the
driver's refcount is not 0). However, these modifications will require
some code reorganization and rewrite which will be too intrusive for
a fix.
To manage notifications about this bug go to:
https://bugs.launchpad.net/linaro-power-kernel/+bug/1098343/+subscriptions
References