Skip to content

sched: Address idle task vs pcpu kthread checks

Valentin Schneider lkml 1 version Applied

Status from this message: The following commit has been merged into the sched/core branch of tip:

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2sched: Make the idle task quack like a per-CPU kthreadinclude/linux/kthread.h kernel/kthread.c kernel/sched/core.c+35 -183 replies
2/2lib/smp_processor_id: Use is_percpu_thread() instead of nr_cpus_allowedlib/smp_processor_id.c+1 -52 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchValentin Schneider
1/2
2/2T-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] sched: Address idle task vs pcpu kthread checks

Commit

5ba2ffba13a1 ("sched: Fix CPU hotplug / tighten is_per_cpu_kthread()")

had to special-case the idle task when checking for per-CPU kthreads. This is due to the idle task not having its own struct kthread, which is where we'd store KTHREAD_IS_PER_CPU.

From staring at Yejune's recent patch [1], it turns out the idle task is also missing PF_NO_SETAFFINITY.

Patch 1 cleans this up, patch 2 is Yejune's v1 which depends on it.

Note: I remember seeing some patch(es) from Peter tackling this exact problem, but I couldn't find them again.

[1]: http://lore.kernel.org/r/[email protected]

Cheers,
Valentin

Valentin Schneider (1):
sched: Make the idle task quack like a per-CPU kthread

Yejune Deng (1):
lib/smp_processor_id: Use is_percpu_thread() instead of
nr_cpus_allowed

 include/linux/kthread.h |  2 ++
 kernel/kthread.c        | 30 ++++++++++++++++++------------
 kernel/sched/core.c     | 21 +++++++++++++++------
 lib/smp_processor_id.c  |  6 +-----
 4 files changed, 36 insertions(+), 23 deletions(-)

--
2.25.1