]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
s390/smp: Avoid calling rebuild_sched_domains() early
authorHeiko Carstens <hca@linux.ibm.com>
Mon, 16 Feb 2026 14:02:33 +0000 (15:02 +0100)
committerHeiko Carstens <hca@linux.ibm.com>
Tue, 17 Feb 2026 14:49:04 +0000 (15:49 +0100)
Since a recent cpuset code change [1] the kernel emits warnings like this:

WARNING: kernel/cgroup/cpuset.c:966 at rebuild_sched_domains_locked+0xe0/0x120, CPU#0: kworker/0:0/9
Modules linked in:
CPU: 0 UID: 0 PID: 9 Comm: kworker/0:0 Not tainted 6.20.0-20260215.rc0.git3.bb7a3fc2c976.300.fc43.s390x+git #1 PREEMPTLAZY
Hardware name: IBM 3931 A01 703 (KVM/Linux)
Workqueue: events topology_work_fn
Krnl PSW : 0704c00180000000 000002922e7af5c4 (rebuild_sched_domains_locked+0xe4/0x120)
...
Call Trace:
 [<000002922e7af5c4>] rebuild_sched_domains_locked+0xe4/0x120
 [<000002922e7af634>] rebuild_sched_domains+0x34/0x50
 [<000002922e6ba232>] process_one_work+0x1b2/0x490
 [<000002922e6bc4b8>] worker_thread+0x1f8/0x3b0
 [<000002922e6c6a98>] kthread+0x148/0x170
 [<000002922e645ffc>] __ret_from_fork+0x3c/0x240
 [<000002922f51f492>] ret_from_fork+0xa/0x30

Reason for this is that the s390 specific smp initialization code schedules
a work which rebuilds scheduling domains way before the scheduler is smp
aware. With the mentioned commit the (invalid) rebuild request is not
anymore silently discarded but instead leads to warning.

Address this by avoiding the early rebuild request.

Reported-by: Marc Hartmayer <marc@linux.ibm.com>
Tested-by: Marc Hartmayer <marc@linux.ibm.com>
Fixes: 6ee43047e8ad ("cpuset: Remove unnecessary checks in rebuild_sched_domains_locked") [1]
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/kernel/smp.c

index b7429f30afc19e03cfaeeeb41c10da3d8d197028..eb334539444abb1a10318e3192614f47b51db70b 100644 (file)
@@ -1151,7 +1151,7 @@ int __ref smp_rescan_cpus(bool early)
        smp_get_core_info(info, 0);
        nr = __smp_rescan_cpus(info, early);
        kfree(info);
-       if (nr)
+       if (nr && !early)
                topology_schedule_update();
        return 0;
 }