Skip to content

kthread: Stop using TASK_UNINTERRUPTIBLE

Eric W. Biederman linux-mm lkml llvm 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3kthread: Remove the flags argument from kernel_threadinclude/linux/sched/task.h init/main.c kernel/fork.c +1 more+5 -41 reply
2/3kthread: Replace kernel_thread with new_kthreadinclude/linux/sched/task.h init/main.c kernel/fork.c +1 more+11 -110 replies
3/3kthread: Stop abusing TASK_UNINTERRUPTIBLE (INCOMPLETE)arch/arm/common/bL_switcher.c arch/x86/kernel/cpu/resctrl/pseudo_lock.c drivers/block/mtip32xx/mtip32xx.c +13 more+72 -7712 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] kthread: Stop using TASK_UNINTERRUPTIBLE

Being silly I figured I would poke my nose in and see how much work it is to never wake up kthreads until we are ready to use them.

This is my first draft at that and something that can hopefully shape the conversation on how we want to fix things a little bit.

The big thing that needs to happen that I haven't implemented is that kthread_run and kthread_run_on_cpu need to be uninlined and moved into kthread.c. This will allow them to call wake_up_new_task even from modular code.

The handful of drivers that are using kthread_create_on_node by extension need to be modified to use kthread_run or kthread_run_on_cpu.

Eric W. Biederman (3):
kthread: Remove the flags argument from kernel_thread
kthread: Replace kernel_thread with new_kthread
kthread: Stop abusing TASK_UNINTERRUPTIBLE (INCOMPLETE)

 arch/arm/common/bL_switcher.c             |   2 +-
 arch/x86/kernel/cpu/resctrl/pseudo_lock.c |   4 +-
 drivers/block/mtip32xx/mtip32xx.c         |   2 +-
 drivers/firmware/psci/psci_checker.c      |   2 +-
 drivers/firmware/stratix10-svc.c          |   4 +-
 drivers/scsi/bnx2fc/bnx2fc_fcoe.c         |   2 +-
 drivers/scsi/bnx2i/bnx2i_init.c           |   2 +-
 drivers/scsi/qedi/qedi_main.c             |   2 +-
 include/linux/kthread.h                   |   4 +-
 include/linux/sched/task.h                |   2 +-
 init/main.c                               |   6 +-
 kernel/bpf/cpumap.c                       |   2 +-
 kernel/dma/map_benchmark.c                |   2 +-
 kernel/fork.c                             |   5 +-
 kernel/kthread.c                          | 120 +++++++++++++++---------------
 kernel/smpboot.c                          |   1 +
 kernel/workqueue.c                        |   2 +-
 net/core/pktgen.c                         |   2 +-
 net/sunrpc/svc.c                          |   2 +-
 19 files changed, 82 insertions(+), 86 deletions(-)

Eric