All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 00/24] RSEQ node id and virtual cpu id extensions
@ 2022-11-03 20:03 Mathieu Desnoyers
  2022-11-03 20:03 ` [PATCH v5 01/24] rseq: Introduce feature size and alignment ELF auxiliary vector entries Mathieu Desnoyers
                   ` (23 more replies)
  0 siblings, 24 replies; 43+ messages in thread
From: Mathieu Desnoyers @ 2022-11-03 20:03 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: linux-kernel, Thomas Gleixner, Paul E . McKenney, Boqun Feng,
	H . Peter Anvin, Paul Turner, linux-api, Christian Brauner,
	Florian Weimer, David.Laight, carlos, Peter Oskolkov,
	Alexander Mikhalitsyn, Chris Kennelly, Mathieu Desnoyers

Extend the rseq ABI to expose a NUMA node ID and a vm_vcpu_id field.

The NUMA node ID field allows implementing a faster getcpu(2) in libc.

The virtual cpu id allows ideal scaling (down or up) of user-space
per-cpu data structures. The virtual cpu ids allocated within a memory
space are tracked by the scheduler, which takes into account the number
of concurrently running threads, thus implicitly considering the number
of threads, the cpu affinity, the cpusets applying to those threads, and
the number of logical cores on the system.

This series is based on tip/sched/core
commit 52b33d87b9197 ("sched/psi: Use task->psi_flags to clear in CPU migration")

Thanks,

Mathieu

Mathieu Desnoyers (24):
  rseq: Introduce feature size and alignment ELF auxiliary vector
    entries
  rseq: Introduce extensible rseq ABI
  rseq: Extend struct rseq with numa node id
  selftests/rseq: Use ELF auxiliary vector for extensible rseq
  selftests/rseq: Implement rseq numa node id field selftest
  lib: Implement find_{first,next,nth}_notandnot_bit,
    find_first_andnot_bit
  cpumask: Implement cpumask_{first,next}_{not,}andnot
  sched: Introduce per memory space current virtual cpu id
  rseq: Extend struct rseq with per memory space vcpu id
  selftests/rseq: Remove RSEQ_SKIP_FASTPATH code
  selftests/rseq: Implement rseq vm_vcpu_id field support
  selftests/rseq: x86: Template memory ordering and percpu access mode
  selftests/rseq: arm: Template memory ordering and percpu access mode
  selftests/rseq: arm64: Template memory ordering and percpu access mode
  selftests/rseq: mips: Template memory ordering and percpu access mode
  selftests/rseq: ppc: Template memory ordering and percpu access mode
  selftests/rseq: s390: Template memory ordering and percpu access mode
  selftests/rseq: riscv: Template memory ordering and percpu access mode
  selftests/rseq: Implement basic percpu ops vm_vcpu_id test
  selftests/rseq: Implement parametrized vm_vcpu_id test
  selftests/rseq: x86: Implement rseq_load_u32_u32
  selftests/rseq: Implement numa node id vs vm_vcpu_id invariant test
  selftests/rseq: parametrized test: Report/abort on negative cpu id
  tracing/rseq: Add mm_vcpu_id field to rseq_update

 fs/binfmt_elf.c                               |    5 +
 fs/exec.c                                     |    6 +
 include/linux/cpumask.h                       |   60 +
 include/linux/find.h                          |  123 +-
 include/linux/mm.h                            |   25 +
 include/linux/mm_types.h                      |  110 +-
 include/linux/sched.h                         |    9 +
 include/trace/events/rseq.h                   |    7 +-
 include/uapi/linux/auxvec.h                   |    2 +
 include/uapi/linux/rseq.h                     |   22 +
 init/Kconfig                                  |    4 +
 kernel/fork.c                                 |   11 +-
 kernel/ptrace.c                               |    2 +-
 kernel/rseq.c                                 |   65 +-
 kernel/sched/core.c                           |   52 +
 kernel/sched/sched.h                          |  168 +++
 kernel/signal.c                               |    2 +
 lib/find_bit.c                                |   42 +
 tools/testing/selftests/rseq/.gitignore       |    5 +
 tools/testing/selftests/rseq/Makefile         |   20 +-
 .../testing/selftests/rseq/basic_numa_test.c  |  117 ++
 .../selftests/rseq/basic_percpu_ops_test.c    |   46 +-
 tools/testing/selftests/rseq/basic_test.c     |    4 +
 tools/testing/selftests/rseq/compiler.h       |    6 +
 tools/testing/selftests/rseq/param_test.c     |  157 ++-
 tools/testing/selftests/rseq/rseq-abi.h       |   22 +
 tools/testing/selftests/rseq/rseq-arm-bits.h  |  505 +++++++
 tools/testing/selftests/rseq/rseq-arm.h       |  701 +---------
 .../testing/selftests/rseq/rseq-arm64-bits.h  |  392 ++++++
 tools/testing/selftests/rseq/rseq-arm64.h     |  520 +------
 .../testing/selftests/rseq/rseq-bits-reset.h  |   11 +
 .../selftests/rseq/rseq-bits-template.h       |   41 +
 tools/testing/selftests/rseq/rseq-mips-bits.h |  462 +++++++
 tools/testing/selftests/rseq/rseq-mips.h      |  646 +--------
 tools/testing/selftests/rseq/rseq-ppc-bits.h  |  454 +++++++
 tools/testing/selftests/rseq/rseq-ppc.h       |  617 +--------
 .../testing/selftests/rseq/rseq-riscv-bits.h  |  410 ++++++
 tools/testing/selftests/rseq/rseq-riscv.h     |  529 +-------
 tools/testing/selftests/rseq/rseq-s390-bits.h |  474 +++++++
 tools/testing/selftests/rseq/rseq-s390.h      |  495 +------
 tools/testing/selftests/rseq/rseq-skip.h      |   65 -
 tools/testing/selftests/rseq/rseq-x86-bits.h  | 1036 ++++++++++++++
 tools/testing/selftests/rseq/rseq-x86.h       | 1193 +----------------
 tools/testing/selftests/rseq/rseq.c           |   86 +-
 tools/testing/selftests/rseq/rseq.h           |  229 +++-
 .../testing/selftests/rseq/run_param_test.sh  |    5 +
 46 files changed, 5294 insertions(+), 4669 deletions(-)
 create mode 100644 tools/testing/selftests/rseq/basic_numa_test.c
 create mode 100644 tools/testing/selftests/rseq/rseq-arm-bits.h
 create mode 100644 tools/testing/selftests/rseq/rseq-arm64-bits.h
 create mode 100644 tools/testing/selftests/rseq/rseq-bits-reset.h
 create mode 100644 tools/testing/selftests/rseq/rseq-bits-template.h
 create mode 100644 tools/testing/selftests/rseq/rseq-mips-bits.h
 create mode 100644 tools/testing/selftests/rseq/rseq-ppc-bits.h
 create mode 100644 tools/testing/selftests/rseq/rseq-riscv-bits.h
 create mode 100644 tools/testing/selftests/rseq/rseq-s390-bits.h
 delete mode 100644 tools/testing/selftests/rseq/rseq-skip.h
 create mode 100644 tools/testing/selftests/rseq/rseq-x86-bits.h

-- 
2.25.1


^ permalink raw reply	[flat|nested] 43+ messages in thread

end of thread, other threads:[~2022-11-21 19:52 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-03 20:03 [PATCH v5 00/24] RSEQ node id and virtual cpu id extensions Mathieu Desnoyers
2022-11-03 20:03 ` [PATCH v5 01/24] rseq: Introduce feature size and alignment ELF auxiliary vector entries Mathieu Desnoyers
2022-11-03 20:03 ` [PATCH v5 02/24] rseq: Introduce extensible rseq ABI Mathieu Desnoyers
2022-11-03 20:03 ` [PATCH v5 03/24] rseq: Extend struct rseq with numa node id Mathieu Desnoyers
2022-11-03 20:03 ` [PATCH v5 04/24] selftests/rseq: Use ELF auxiliary vector for extensible rseq Mathieu Desnoyers
2022-11-03 20:03 ` [PATCH v5 05/24] selftests/rseq: Implement rseq numa node id field selftest Mathieu Desnoyers
2022-11-03 20:03 ` [PATCH v5 06/24] lib: Implement find_{first,next,nth}_notandnot_bit, find_first_andnot_bit Mathieu Desnoyers
2022-11-03 20:03 ` [PATCH v5 07/24] cpumask: Implement cpumask_{first,next}_{not,}andnot Mathieu Desnoyers
2022-11-03 20:03 ` [PATCH v5 08/24] sched: Introduce per memory space current virtual cpu id Mathieu Desnoyers
2022-11-08 13:00   ` Peter Zijlstra
2022-11-08 19:45     ` Mathieu Desnoyers
2022-11-08 13:04   ` Peter Zijlstra
2022-11-08 20:07     ` Mathieu Desnoyers
2022-11-09 10:19       ` Peter Zijlstra
2022-11-09  9:28   ` Peter Zijlstra
2022-11-09 15:04     ` Mathieu Desnoyers
2022-11-09  9:42   ` Peter Zijlstra
2022-11-09 15:09     ` Mathieu Desnoyers
2022-11-11  4:41   ` Andy Lutomirski
2022-11-11 14:18     ` Mathieu Desnoyers
2022-11-14 20:49       ` Sean Christopherson
2022-11-17 17:19         ` Mathieu Desnoyers
2022-11-17 19:10           ` Sean Christopherson
2022-11-17 19:42             ` Mathieu Desnoyers
2022-11-17 21:15               ` Sean Christopherson
2022-11-21 19:00                 ` Mathieu Desnoyers
2022-11-21 19:52                   ` Mathieu Desnoyers
2022-11-03 20:03 ` [PATCH v5 09/24] rseq: Extend struct rseq with per memory space vcpu id Mathieu Desnoyers
2022-11-03 20:03 ` [PATCH v5 10/24] selftests/rseq: Remove RSEQ_SKIP_FASTPATH code Mathieu Desnoyers
2022-11-03 20:03 ` [PATCH v5 11/24] selftests/rseq: Implement rseq vm_vcpu_id field support Mathieu Desnoyers
2022-11-03 20:03 ` [PATCH v5 12/24] selftests/rseq: x86: Template memory ordering and percpu access mode Mathieu Desnoyers
2022-11-03 20:03 ` [PATCH v5 13/24] selftests/rseq: arm: " Mathieu Desnoyers
2022-11-03 20:03 ` [PATCH v5 14/24] selftests/rseq: arm64: " Mathieu Desnoyers
2022-11-03 20:03 ` [PATCH v5 15/24] selftests/rseq: mips: " Mathieu Desnoyers
2022-11-03 20:03 ` [PATCH v5 16/24] selftests/rseq: ppc: " Mathieu Desnoyers
2022-11-03 20:03 ` [PATCH v5 17/24] selftests/rseq: s390: " Mathieu Desnoyers
2022-11-03 20:03 ` [PATCH v5 18/24] selftests/rseq: riscv: " Mathieu Desnoyers
2022-11-03 20:03 ` [PATCH v5 19/24] selftests/rseq: Implement basic percpu ops vm_vcpu_id test Mathieu Desnoyers
2022-11-03 20:03 ` [PATCH v5 20/24] selftests/rseq: Implement parametrized " Mathieu Desnoyers
2022-11-03 20:03 ` [PATCH v5 21/24] selftests/rseq: x86: Implement rseq_load_u32_u32 Mathieu Desnoyers
2022-11-03 20:03 ` [PATCH v5 22/24] selftests/rseq: Implement numa node id vs vm_vcpu_id invariant test Mathieu Desnoyers
2022-11-03 20:03 ` [PATCH v5 23/24] selftests/rseq: parametrized test: Report/abort on negative cpu id Mathieu Desnoyers
2022-11-03 20:03 ` [PATCH v5 24/24] tracing/rseq: Add mm_vcpu_id field to rseq_update Mathieu Desnoyers

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.