diff options
author | Daniel Vetter <[email protected]> | 2021-08-05 12:46:48 +0200 |
---|---|---|
committer | Daniel Vetter <[email protected]> | 2021-08-30 10:53:48 +0200 |
commit | b0a5303d4e140ed8e534e44b278ca5d07401851d (patch) | |
tree | 8e1c6590909bcaf227490fa2b948cf4385af1e74 /tools/perf/scripts/python/stackcollapse.py | |
parent | 357285a2d1c06f0667c81e4dda35b92788b4f20c (diff) |
drm/sched: Barriers are needed for entity->last_scheduled
It might be good enough on x86 with just READ_ONCE, but the write side
should then at least be WRITE_ONCE because x86 has total store order.
It's definitely not enough on arm.
Fix this proplery, which means
- explain the need for the barrier in both places
- point at the other side in each comment
Also pull out the !sched_list case as the first check, so that the
code flow is clearer.
While at it sprinkle some comments around because it was very
non-obvious to me what's actually going on here and why.
Note that we really need full barriers here, at first I thought
store-release and load-acquire on ->last_scheduled would be enough,
but we actually requiring ordering between that and the queue state.
v2: Put smp_rmp() in the right place and fix up comment (Andrey)
Reviewed-by: Christian König <[email protected]>
Acked-by: Melissa Wen <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Cc: "Christian König" <[email protected]>
Cc: Steven Price <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Andrey Grodzovsky <[email protected]>
Cc: Lee Jones <[email protected]>
Cc: Boris Brezillon <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions