diff options
author | Qais Yousef <qyousef@layalina.io> | 2024-03-24 03:45:49 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2024-03-25 14:09:53 +0300 |
commit | 77222b0d12e8ae6f082261842174cc2e981bf99c (patch) | |
tree | 9cef8509e034f42484679cbd856aa31d0ead1ccd /kernel/sched/sched.h | |
parent | f4566a1e73957800df75a3dd2dccee8a4697f327 (diff) | |
download | linux-77222b0d12e8ae6f082261842174cc2e981bf99c.tar.xz |
sched/topology: Export asym_cap_list
So that we can use it to iterate through available capacities in the
system. Sort asym_cap_list in descending order as expected users are
likely to be interested on the highest capacity first.
Make the list RCU protected to allow for cheap access in hot paths.
Signed-off-by: Qais Yousef <qyousef@layalina.io>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
Link: https://lore.kernel.org/r/20240324004552.999936-2-qyousef@layalina.io
Diffstat (limited to 'kernel/sched/sched.h')
-rw-r--r-- | kernel/sched/sched.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 41024c1c49b4..f77c00dddfe1 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -110,6 +110,20 @@ extern int sysctl_sched_rt_runtime; extern int sched_rr_timeslice; /* + * Asymmetric CPU capacity bits + */ +struct asym_cap_data { + struct list_head link; + struct rcu_head rcu; + unsigned long capacity; + unsigned long cpus[]; +}; + +extern struct list_head asym_cap_list; + +#define cpu_capacity_span(asym_data) to_cpumask((asym_data)->cpus) + +/* * Helpers for converting nanosecond timing to jiffy resolution */ #define NS_TO_JIFFIES(TIME) ((unsigned long)(TIME) / (NSEC_PER_SEC / HZ)) |