Commit 3ee5333f authored by Heiko Carstens's avatar Heiko Carstens
Browse files

s390/smp: Avoid calling rebuild_sched_domains() early



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.bb7a3fc2.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: default avatarMarc Hartmayer <marc@linux.ibm.com>
Tested-by: default avatarMarc Hartmayer <marc@linux.ibm.com>
Fixes: 6ee43047 ("cpuset: Remove unnecessary checks in rebuild_sched_domains_locked") [1]
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
parent dd341195
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
}