diff options
| author | Thomas Gleixner <[email protected]> | 2015-04-14 21:09:25 +0000 |
|---|---|---|
| committer | Thomas Gleixner <[email protected]> | 2015-04-22 17:06:52 +0200 |
| commit | 19d9f4225dd6a47fca430f15eeae345ceb95c301 (patch) | |
| tree | f90969148ac0bb48b93322ee35a8aa3a5780f22f /tools/perf/scripts/python | |
| parent | 61699e13072a89880aa584dcc64c6da465fb2ccc (diff) | |
hrtimer: Avoid locking in hrtimer_cancel() if timer not active
We can do a lockless check for hrtimer_active before actually taking
the lock in hrtimer[_try_to]_cancel. This is useful for hotpath users
like nanosleep as they avoid the lock dance when the timer has
expired.
This is safe because active is true when the timer is enqueued or the
callback is running. Taking the hrtimer base lock does not protect
against concurrent hrtimer_start calls, the callsite has to do the
proper serialization itself.
Signed-off-by: Thomas Gleixner <[email protected]>
Acked-by: Peter Zijlstra <[email protected]>
Cc: Preeti U Murthy <[email protected]>
Cc: Viresh Kumar <[email protected]>
Cc: Marcelo Tosatti <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions