Skip to content

sched/umcg: RFC UMCG patchset

Peter Oskolkov linux-api lkml oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5sched/umcg: add WF_CURRENT_CPU and externise ttwukernel/sched/core.c kernel/sched/fair.c kernel/sched/sched.h+14 -80 replies
2/5sched/umcg: RFC: add userspace atomic helperskernel/sched/umcg_uaccess.h+344 -03 replies
3/5sched/umcg: RFC: implement UMCG syscallsarch/x86/entry/syscalls/syscall_64.tbl fs/exec.c include/linux/sched.h +10 more+963 -34 replies
4/5sched/umcg: add Documentation/userspace-api/umcg.rstDocumentation/userspace-api/umcg.rst+550 -00 replies
5/5sched/umcg: add Documentation/userspace-api/umcg.txtDocumentation/userspace-api/umcg.txt+537 -06 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/5 v0.6] sched/umcg: RFC UMCG patchset

Many thanks to Jann Horn for a detailed review of v0.5:
https://lore.kernel.org/lkml/[email protected]/

The main change in this patchet vs v0.5 is pinning of pages containing struct umcg_task of RUNNING workers and their servers. This allows uaccess operations from sched_submit_work (preempt-disabled). The pages are pinned only for RUNNING workers, i.e. at most NR_CPUS pages are pinned by UMCG at any one time, across the whole machine.

A smaller change is the move of worker wakeup processing from sched_update_worker() to exit_to_user_mode_loop(), to ensure that no kernel locks are held if the worker is descheduled there.

Commit messages in patches 2 and 3 list more changes.

Peter Oskolkov (5):
sched/umcg: add WF_CURRENT_CPU and externise ttwu sched/umcg: RFC: add userspace atomic helpers sched/umcg: RFC: implement UMCG syscalls sched/umcg: add Documentation/userspace-api/umcg.rst sched/umcg: add Documentation/userspace-api/umcg.txt

 Documentation/userspace-api/umcg.rst   | 550 ++++++++++++++++++
 Documentation/userspace-api/umcg.txt   | 537 ++++++++++++++++++
 arch/x86/entry/syscalls/syscall_64.tbl |   2 +
 fs/exec.c                              |   1 +
 include/linux/sched.h                  |  56 ++
 include/linux/syscalls.h               |   4 +
 include/uapi/asm-generic/unistd.h      |   8 +-
 include/uapi/linux/umcg.h              | 117 ++++
 init/Kconfig                           |  10 +
 kernel/entry/common.c                  |   1 +
 kernel/exit.c                          |   2 +
 kernel/sched/Makefile                  |   1 +
 kernel/sched/core.c                    |  18 +-
 kernel/sched/fair.c                    |   4 +
 kernel/sched/sched.h                   |  15 +-
 kernel/sched/umcg.c                    | 745 +++++++++++++++++++++++++
 kernel/sched/umcg_uaccess.h            | 344 ++++++++++++
 kernel/sys_ni.c                        |   4 +
 18 files changed, 2408 insertions(+), 11 deletions(-)
 create mode 100644 Documentation/userspace-api/umcg.rst
 create mode 100644 Documentation/userspace-api/umcg.txt
 create mode 100644 include/uapi/linux/umcg.h
 create mode 100644 kernel/sched/umcg.c
 create mode 100644 kernel/sched/umcg_uaccess.h

--
2.25.1