linux-yocto/kernel/sched
Aruna Ramakrishna 496efa228f sched: Change nr_uninterruptible type to unsigned long
commit 36569780b0 upstream.

The commit e6fe3f422b ("sched: Make multiple runqueue task counters
32-bit") changed nr_uninterruptible to an unsigned int. But the
nr_uninterruptible values for each of the CPU runqueues can grow to
large numbers, sometimes exceeding INT_MAX. This is valid, if, over
time, a large number of tasks are migrated off of one CPU after going
into an uninterruptible state. Only the sum of all nr_interruptible
values across all CPUs yields the correct result, as explained in a
comment in kernel/sched/loadavg.c.

Change the type of nr_uninterruptible back to unsigned long to prevent
overflows, and thus the miscalculation of load average.

Fixes: e6fe3f422b ("sched: Make multiple runqueue task counters 32-bit")

Signed-off-by: Aruna Ramakrishna <aruna.ramakrishna@oracle.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20250709173328.606794-1-aruna.ramakrishna@oracle.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-07-24 08:53:20 +02:00
..
autogroup.c
autogroup.h
build_policy.c
build_utility.c
clock.c Locking changes for v6.5: 2023-06-27 14:14:30 -07:00
completion.c sched: add a few helpers to wake up tasks on the current cpu 2023-07-17 16:08:08 -07:00
core_sched.c
core.c sched/cpufreq: Rework schedutil governor performance estimation 2025-05-02 07:50:41 +02:00
cpuacct.c
cpudeadline.c sched/topology: Consolidate and clean up access to a CPU's max compute capacity 2025-05-02 07:50:41 +02:00
cpudeadline.h
cpufreq_schedutil.c cpufreq/sched: Explicitly synchronize limits_changed flag handling 2025-05-02 07:50:41 +02:00
cpufreq.c
cpupri.c sched/rt: Fix live lock between select_fallback_rq() and RT push 2023-09-28 22:58:13 +02:00
cpupri.h
cputime.c sched/cputime: Fix mul_u64_u64_div_u64() precision for cputime 2024-08-14 13:58:47 +02:00
deadline.c sched/topology: Consolidate and clean up access to a CPU's max compute capacity 2025-05-02 07:50:41 +02:00
debug.c sched/debug: Provide slice length for fair tasks 2025-03-22 12:50:40 -07:00
fair.c sched: Reduce the default slice to avoid tasks getting an extra tick 2025-06-04 14:42:09 +02:00
features.h sched/eevdf: Curb wakeup-preemption 2023-08-17 17:07:07 +02:00
idle.c sched/fair: Rename check_preempt_curr() to wakeup_preempt() 2024-12-14 20:00:18 +01:00
isolation.c sched/isolation: Fix boot crash when maxcpus < first housekeeping CPU 2024-06-12 11:11:24 +02:00
loadavg.c sched: Change nr_uninterruptible type to unsigned long 2025-07-24 08:53:20 +02:00
Makefile
membarrier.c sched/membarrier: reduce the ability to hammer on sys_membarrier 2024-02-23 09:25:27 +01:00
pelt.c
pelt.h
psi.c sched: psi: fix bogus pressure spikes from aggregation race 2024-10-10 11:58:03 +02:00
rt.c sched/topology: Consolidate and clean up access to a CPU's max compute capacity 2025-05-02 07:50:41 +02:00
sched-pelt.h
sched.h sched: Change nr_uninterruptible type to unsigned long 2025-07-24 08:53:20 +02:00
smp.h sched, smp: Trace smp callback causing an IPI 2023-03-24 11:01:29 +01:00
stats.c profiling: remove profile=sleep support 2024-08-14 13:58:47 +02:00
stats.h sched: Move psi_account_irqtime() out of update_rq_clock_task() hotpath 2024-07-18 13:21:25 +02:00
stop_task.c sched: Unify runtime accounting across classes 2024-12-14 20:00:19 +01:00
swait.c sched: add a few helpers to wake up tasks on the current cpu 2023-07-17 16:08:08 -07:00
topology.c sched/topology: Consolidate and clean up access to a CPU's max compute capacity 2025-05-02 07:50:41 +02:00
wait_bit.c
wait.c sched: add a few helpers to wake up tasks on the current cpu 2023-07-17 16:08:08 -07:00