diff options
| author | Zhan Xusheng <zhanxusheng@xiaomi.com> | 2026-11-02 10:15:36 +0800 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2026-11-09 10:09:27 +0100 |
| commit | 78b47fb995b5f3e7e54f0bde365063b530299726 (patch) | |
| tree | cade708021d2df601b232676ae57b0f2bff78c43 /rust/kernel/alloc/kvec/errors.rs | |
| parent | f7141257dd67d4936f906a6cfd1d0007721f6898 (diff) | |
sched/cache: Don't use fits_capacity() to compare thread and CPU counts
invalid_llc_nr() uses fits_capacity() to compare a thread count with a
CPU count, only for its 20% margin. Qais's series changes
fits_capacity() to take a CPU number as its second argument, and this
call would then pass the CPU count as a CPU number without a warning.
Give the check its own helper. x * 5 < y * 4 is the same comparison as
x * 1280 < y * 1024, so there is no functional change.
Signed-off-by: Zhan Xusheng <zhanxusheng@xiaomi.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Qais Yousef <qyousef@layalina.io>
Reviewed-by: Chen Yu <yu.c.chen@intel.com>
Reviewed-by: Tim Chen <tim.c.chen@linux.intel.com>
Link: https://lore.kernel.org/all/20260504020003.71306-5-qyousef@layalina.io/
Link: https://patch.msgid.link/20261102021536.1026143-1-zhanxusheng1024@gmail.com
Diffstat (limited to 'rust/kernel/alloc/kvec/errors.rs')
0 files changed, 0 insertions, 0 deletions
