Skip to content

rcuscale: Add debugfs file based controls and CPU affinity offset

Yuzhuo Jing linux-doc linux-mm lkml oe-kbuild-all rcu 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4rcuscale: Create debugfs file for writer durationsDocumentation/admin-guide/kernel-parameters.txt kernel/rcu/rcuscale.c+139 -80 replies
2/4rcuscale: Create debugfs files for worker thread PIDskernel/rcu/rcuscale.c+124 -00 replies
3/4rcuscale: Add file based start/finish controlDocumentation/admin-guide/kernel-parameters.txt kernel/rcu/rcuscale.c+84 -00 replies
4/4rcuscale: Add CPU affinity offset optionsDocumentation/admin-guide/kernel-parameters.txt kernel/rcu/rcuscale.c+30 -50 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH v1 0/4] rcuscale: Add debugfs file based controls and CPU affinity offset

In an effort to add RCU benchmarks to the perf tool and to improve the base-metal rcuscale tests, this patch series adds several auxiliary features useful for testing tools.

This series introduces a few rcuscale options:
* writer_no_print: skip writer duration printing during shutdown, but instead let users read from the new "writer_durations" debugfs file. This drastically improves cleanup speed.
* block_start: an option to hold all worker thread until the new debugfs "should_start" file is written.
* {reader,writer,kfree}_cpu_offset: the starting value of CPU affinity for each type of threads. This can be used to avoid scheduling different types of threads on the same CPU. The 4th patch in this series shows drastic performance differences w/ and w/o overlaps.

This patch series creates an "rcuscale" folder in debugfs, containing the following files:
* writer_durations: a CSV formatted file containing writer id and writer durations.
* {reader,writer,kfree}_tasks: the list of kernel task PIDs for external tools to attach to.
* should_start: a writable file to signal the start of the experiment, used in conjunction with the new "block_start" option.
* test_complete: a readable file to indicate whether the experiment has finished or not.

RFCs:
* Should those new files reside in debugfs or in procfs?
* What format should be used for the writer_duartions file, and what documentations should be updated for the file format definition?
* In the 4th patch, we see different characteristics between overlap and non-overlap. Current rcuscale creates nr_cpu readers and nr_cpu writers, thus scheduling 2nr_cpu tasks on nr_cpu CPUs. Should we consider changes to this behavior? Or add automatic conflict resolutions when total threads <= nr_cpu.

Thank you!

Yuzhuo Jing (4):
rcuscale: Create debugfs file for writer durations
rcuscale: Create debugfs files for worker thread PIDs
rcuscale: Add file based start/finish control
rcuscale: Add CPU affinity offset options

 .../admin-guide/kernel-parameters.txt         |  29 ++
 kernel/rcu/rcuscale.c                         | 361 +++++++++++++++++-
 2 files changed, 377 insertions(+), 13 deletions(-)
Signature · 1 line
2.50.1.552.g942d659e1b-goog