diff options
| author | Usama Arif <usama.arif@linux.dev> | 2026-09-21 11:59:12 -0700 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2026-09-21 09:12:04 -1000 |
| commit | b9e602f30bea2847a0c0319c5a6e0bb73d96cd7b (patch) | |
| tree | bbebb1aca1e3d6f9c91d64a88d59ec4d3a481d76 /tools/perf/scripts/python | |
| parent | daaab0f42e2eec54a8fe585b2fa3f5408a9b3585 (diff) | |
sched_ext: Specialize the scheduler hashtable compare
scx_sched_hash_params does not provide an object comparison function,
so rhashtable falls back to rhashtable_compare(). Although the
sub-cgroup ID key is one naturally aligned u64, the generic comparison
reads the key offset and length from the table parameters at runtime and
emits an out-of-line memcmp() for each element walked.
Supply an obj_cmpfn so lookups specialize to a single equality test
against ops.sub_cgroup_id. ext.c and sub.c are included in the same
build_policy.c translation unit, so the compiler can fold the const
callback into scx_find_sub_sched() even though its source is in sub.c.
The result is only tested against zero, so the ordering provided by
memcmp() is not observable. No functional change intended.
Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Usama Arif <usama.arif@linux.dev>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
