[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240117163511.88173-9-longman@redhat.com>
Date: Wed, 17 Jan 2024 11:35:11 -0500
From: Waiman Long <longman@...hat.com>
To: Tejun Heo <tj@...nel.org>,
Zefan Li <lizefan.x@...edance.com>,
Johannes Weiner <hannes@...xchg.org>,
Frederic Weisbecker <frederic@...nel.org>,
Jonathan Corbet <corbet@....net>,
"Paul E. McKenney" <paulmck@...nel.org>,
Neeraj Upadhyay <quic_neeraju@...cinc.com>,
Joel Fernandes <joel@...lfernandes.org>,
Josh Triplett <josh@...htriplett.org>,
Boqun Feng <boqun.feng@...il.com>,
Steven Rostedt <rostedt@...dmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Lai Jiangshan <jiangshanlai@...il.com>,
Zqiang <qiang.zhang1211@...il.com>,
Davidlohr Bueso <dave@...olabs.net>,
Shuah Khan <shuah@...nel.org>
Cc: cgroups@...r.kernel.org,
linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org,
rcu@...r.kernel.org,
linux-kselftest@...r.kernel.org,
Mrunal Patel <mpatel@...hat.com>,
Ryan Phillips <rphillips@...hat.com>,
Brent Rowsell <browsell@...hat.com>,
Peter Hunt <pehunt@...hat.com>,
Cestmir Kalina <ckalina@...hat.com>,
Nicolas Saenz Julienne <nsaenz@...nel.org>,
Alex Gladkov <agladkov@...hat.com>,
Marcelo Tosatti <mtosatti@...hat.com>,
Phil Auld <pauld@...hat.com>,
Paul Gortmaker <paul.gortmaker@...driver.com>,
Daniel Bristot de Oliveira <bristot@...nel.org>,
Juri Lelli <juri.lelli@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Costa Shulyupin <cshulyup@...hat.com>,
Waiman Long <longman@...hat.com>
Subject: [RFC PATCH 8/8] cgroup/cpuset: Update test_cpuset_prs.sh to handle cpuset.cpus.isolation_full
Add a new "-F" option to cpuset.cpus.isolation_full to enable
cpuset.cpus.isolation_full for trying out the effect of enabling
full CPU isolation.
Signed-off-by: Waiman Long <longman@...hat.com>
---
.../selftests/cgroup/test_cpuset_prs.sh | 23 ++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/cgroup/test_cpuset_prs.sh b/tools/testing/selftests/cgroup/test_cpuset_prs.sh
index b5eb1be2248c..2a8f0cb8d252 100755
--- a/tools/testing/selftests/cgroup/test_cpuset_prs.sh
+++ b/tools/testing/selftests/cgroup/test_cpuset_prs.sh
@@ -32,6 +32,7 @@ NR_CPUS=$(lscpu | grep "^CPU(s):" | sed -e "s/.*:[[:space:]]*//")
PROG=$1
VERBOSE=0
DELAY_FACTOR=1
+ISOLATION_FULL=
SCHED_DEBUG=
while [[ "$1" = -* ]]
do
@@ -44,7 +45,10 @@ do
-d) DELAY_FACTOR=$2
shift
;;
- *) echo "Usage: $PROG [-v] [-d <delay-factor>"
+ -F) ISOLATION_FULL=1
+ shift
+ ;;
+ *) echo "Usage: $PROG [-v] [-d <delay-factor>] [-F]"
exit
;;
esac
@@ -108,6 +112,22 @@ console_msg()
pause 0.01
}
+setup_isolation_full()
+{
+ ISOL_FULL=${CGROUP2}/cpuset.cpus.isolation_full
+ if [[ -n "$ISOLATION_FULL" ]]
+ then
+ echo 1 > $ISOL_FULL
+ set -- $(cat $ISOL_FULL)
+ ISOLATION_FLAGS=$2
+ [[ $VERBOSE -gt 0 ]] && {
+ echo "Full CPU isolation flags: $ISOLATION_FLAGS"
+ }
+ else
+ echo 0 > $ISOL_FULL
+ fi
+}
+
test_partition()
{
EXPECTED_VAL=$1
@@ -930,6 +950,7 @@ test_inotify()
}
trap cleanup 0 2 3 6
+setup_isolation_full
run_state_test TEST_MATRIX
test_isolated
test_inotify
--
2.39.3
Powered by blists - more mailing lists