diff options
| author | Oleg Nesterov <[email protected]> | 2016-08-02 14:03:44 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2016-08-02 19:35:02 -0400 |
| commit | 61e96496d3c949701a48b908f99f4ed891cd1101 (patch) | |
| tree | bf282d3036968de0bfd834914d712b6875fff7e3 /tools/perf/scripts/python/stat-cpi.py | |
| parent | 949bed2f5764435715e3d6dd3ab6dd4dbd890a71 (diff) | |
task_work: use READ_ONCE/lockless_dereference, avoid pi_lock if !task_works
Change task_work_cancel() to use lockless_dereference(), this is what
the code really wants but we didn't have this helper when it was
written.
Also add the fast-path task->task_works == NULL check, in the likely
case this task has no pending works and we can avoid
spin_lock(task->pi_lock).
While at it, change other users of ACCESS_ONCE() to use READ_ONCE().
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Oleg Nesterov <[email protected]>
Cc: Andrea Parri <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/stat-cpi.py')
0 files changed, 0 insertions, 0 deletions