aboutsummaryrefslogtreecommitdiff
path: root/ipc
diff options
context:
space:
mode:
authorGravatar Mel Gorman <mgorman@techsingularity.net> 2022-08-04 10:21:19 +0100
committerGravatar Ingo Molnar <mingo@kernel.org> 2022-08-04 11:26:13 +0200
commit751d4cbc43879229dbc124afefe240b70fd29a85 (patch)
treeed94d46ded85dfccad4fab9c8aeb0426d750c368 /ipc
parentsched/rt: Fix Sparse warnings due to undefined rt.c declarations (diff)
downloadlinux-751d4cbc43879229dbc124afefe240b70fd29a85.tar.gz
linux-751d4cbc43879229dbc124afefe240b70fd29a85.tar.bz2
linux-751d4cbc43879229dbc124afefe240b70fd29a85.zip
sched/core: Do not requeue task on CPU excluded from cpus_mask
The following warning was triggered on a large machine early in boot on a distribution kernel but the same problem should also affect mainline. WARNING: CPU: 439 PID: 10 at ../kernel/workqueue.c:2231 process_one_work+0x4d/0x440 Call Trace: <TASK> rescuer_thread+0x1f6/0x360 kthread+0x156/0x180 ret_from_fork+0x22/0x30 </TASK> Commit c6e7bd7afaeb ("sched/core: Optimize ttwu() spinning on p->on_cpu") optimises ttwu by queueing a task that is descheduling on the wakelist, but does not check if the task descheduling is still allowed to run on that CPU. In this warning, the problematic task is a workqueue rescue thread which checks if the rescue is for a per-cpu workqueue and running on the wrong CPU. While this is early in boot and it should be possible to create workers, the rescue thread may still used if the MAYDAY_INITIAL_TIMEOUT is reached or MAYDAY_INTERVAL and on a sufficiently large machine, the rescue thread is being used frequently. Tracing confirmed that the task should have migrated properly using the stopper thread to handle the migration. However, a parallel wakeup from udev running on another CPU that does not share CPU cache observes p->on_cpu and uses task_cpu(p), queues the task on the old CPU and triggers the warning. Check that the wakee task that is descheduling is still allowed to run on its current CPU and if not, wait for the descheduling to complete and select an allowed CPU. Fixes: c6e7bd7afaeb ("sched/core: Optimize ttwu() spinning on p->on_cpu") Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://lore.kernel.org/r/20220804092119.20137-1-mgorman@techsingularity.net
Diffstat (limited to 'ipc')
0 files changed, 0 insertions, 0 deletions