diff options
author | Wander Lairson Costa <wander@redhat.com> | 2024-07-24 11:22:48 -0300 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2024-12-02 12:01:31 +0100 |
commit | 3a181f20fb4e9ad3c93ea6c71520c23826042629 (patch) | |
tree | 946953dd430a3469f0d8e32939878aee51a99944 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 53916d5fd3c0b658de3463439dd2b7ce765072cb (diff) |
sched/deadline: Consolidate Timer Cancellation
After commit b58652db66c9 ("sched/deadline: Fix task_struct reference
leak"), I identified additional calls to hrtimer_try_to_cancel that
might also require a dl_server check. It remains unclear whether this
omission was intentional or accidental in those contexts.
This patch consolidates the timer cancellation logic into dedicated
functions, ensuring consistent behavior across all calls.
Additionally, it reduces code duplication and improves overall code
cleanliness.
Note the use of the __always_inline keyword. In some instances, we
have a task_struct pointer, dereference the dl member, and then use
the container_of macro to retrieve the task_struct pointer again. By
inlining the code, the compiler can potentially optimize out this
redundant round trip.
Signed-off-by: Wander Lairson Costa <wander@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Juri Lelli <juri.lelli@redhat.com>
Link: https://lore.kernel.org/r/20240724142253.27145-3-wander@redhat.com
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions