diff options
| author | Sebastian Andrzej Siewior <[email protected]> | 2020-08-19 22:00:25 +0200 |
|---|---|---|
| committer | Peter Zijlstra <[email protected]> | 2020-08-26 12:41:58 +0200 |
| commit | c1cecf884ad748f63f9139d5a18ee265ee2f70fb (patch) | |
| tree | 9fdcfe0c0b9d905d20932c1aba3971ac14bd2b4a /drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c | |
| parent | 01ccf592362a984534371b3596d4c953da6a7bb2 (diff) | |
sched: Cache task_struct::flags in sched_submit_work()
sched_submit_work() is considered to be a hot path. The preempt_disable()
instruction is a compiler barrier and forces the compiler to load
task_struct::flags for the second comparison.
By using a local variable, the compiler can load the value once and keep it in
a register for the second comparison.
Verified on x86-64 with gcc-10.
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c')
0 files changed, 0 insertions, 0 deletions