From: David Vernet <void@manifault.com>
To: linux-kernel@vger.kernel.org
Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
bsegall@google.com, mgorman@suse.de, bristot@redhat.com,
vschneid@redhat.com, youssefesmat@google.com, joelaf@google.com,
roman.gushchin@linux.dev, yu.c.chen@intel.com,
kprateek.nayak@amd.com, gautham.shenoy@amd.com,
aboorvad@linux.vnet.ibm.com, wuyun.abel@bytedance.com,
tj@kernel.org, kernel-team@meta.com
Subject: [PATCH v4 8/8] sched: Add selftest for SHARED_RUNQ
Date: Mon, 11 Dec 2023 18:31:41 -0600 [thread overview]
Message-ID: <20231212003141.216236-9-void@manifault.com> (raw)
In-Reply-To: <20231212003141.216236-1-void@manifault.com>
We want to ensure that SHARED_RUNQ works as expected. Let's add a
testcase to the sched/ subdirectory containing SHARED_RUNQ which enables
and disables it in a loop, while stressing the system with rcutorture.
Cc: Aboorva Devarajan <aboorvad@linux.vnet.ibm.com>
Signed-off-by: David Vernet <void@manifault.com>
---
tools/testing/selftests/sched/Makefile | 5 ++++-
tools/testing/selftests/sched/config | 2 ++
tools/testing/selftests/sched/test-swq.sh | 23 +++++++++++++++++++++++
3 files changed, 29 insertions(+), 1 deletion(-)
create mode 100755 tools/testing/selftests/sched/test-swq.sh
diff --git a/tools/testing/selftests/sched/Makefile b/tools/testing/selftests/sched/Makefile
index 099ee9213557..22f4941ff76b 100644
--- a/tools/testing/selftests/sched/Makefile
+++ b/tools/testing/selftests/sched/Makefile
@@ -9,6 +9,9 @@ CFLAGS += -O2 -Wall -g -I./ $(KHDR_INCLUDES) -Wl,-rpath=./ \
LDLIBS += -lpthread
TEST_GEN_FILES := cs_prctl_test
-TEST_PROGS := cs_prctl_test
+TEST_PROGS := \
+ cs_prctl_test \
+ test-srq.sh
+
include ../lib.mk
diff --git a/tools/testing/selftests/sched/config b/tools/testing/selftests/sched/config
index e8b09aa7c0c4..6e1cbdb6eec3 100644
--- a/tools/testing/selftests/sched/config
+++ b/tools/testing/selftests/sched/config
@@ -1 +1,3 @@
CONFIG_SCHED_DEBUG=y
+CONFIG_DEBUG_KERNEL=y
+CONFIG_RCU_TORTURE_TEST=m
diff --git a/tools/testing/selftests/sched/test-swq.sh b/tools/testing/selftests/sched/test-swq.sh
new file mode 100755
index 000000000000..547088840a6c
--- /dev/null
+++ b/tools/testing/selftests/sched/test-swq.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (C) 2023 Meta, Inc
+
+echo "TEST: SHARED_RUNQ stress test ..."
+
+modprobe rcutorture
+
+for i in {1..10}; do
+ echo "Beginning iteration $i"
+ echo "SHARED_RUNQ" > /sys/kernel/debug/sched/features
+ sleep 2.3
+ echo "NO_SHARED_RUNQ" > /sys/kernel/debug/sched/features
+ sleep .8
+ echo "Completed iteration $i"
+ echo ""
+done
+
+rmmod rcutorture
+
+echo "DONE: SHARED_RUNQ stress test completed"
+
+exit 0
--
2.42.1
next prev parent reply other threads:[~2023-12-12 0:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-12 0:31 [PATCH v4 0/8] sched: Implement shared runqueue in fair.c David Vernet
2023-12-12 0:31 ` [PATCH v4 1/8] sched: Expose move_queued_task() from core.c David Vernet
2023-12-12 0:31 ` [PATCH v4 2/8] sched: Move is_cpu_allowed() into sched.h David Vernet
2023-12-12 0:31 ` [PATCH v4 3/8] sched: Tighten unpinned rq lock window in newidle_balance() David Vernet
2023-12-12 0:31 ` [PATCH v4 4/8] sched: Check cpu_active() earlier " David Vernet
2023-12-12 0:31 ` [PATCH v4 5/8] sched: Enable sched_feat callbacks on enable/disable David Vernet
2023-12-12 0:31 ` [PATCH v4 6/8] sched: Implement shared runqueue in fair.c David Vernet
2023-12-12 0:31 ` [PATCH v4 7/8] sched: Shard per-LLC shared runqueues David Vernet
2023-12-12 0:31 ` David Vernet [this message]
2024-04-17 8:48 ` [PATCH v4 0/8] sched: Implement shared runqueue in fair.c K Prateek Nayak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231212003141.216236-9-void@manifault.com \
--to=void@manifault.com \
--cc=aboorvad@linux.vnet.ibm.com \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=gautham.shenoy@amd.com \
--cc=joelaf@google.com \
--cc=juri.lelli@redhat.com \
--cc=kernel-team@meta.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=roman.gushchin@linux.dev \
--cc=tj@kernel.org \
--cc=vschneid@redhat.com \
--cc=wuyun.abel@bytedance.com \
--cc=youssefesmat@google.com \
--cc=yu.c.chen@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.