Skip to contentSkip to conversation

util-linux: add chisol tool to configure task isolation

PATCH New Marcelo Tosatti 1 participant 1 message Oct 8, 2021

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 util-linux: add chisol tool to configure task isolation

Add chisol tool to configure task isolation. See chisol -h for details.

For example, to launch a version of oslat that activates task isolation:

chisol -q vmstat_sync -I conf ./oslat -f 1 -c 5 -D 5m

-q vmstat_sync: enable quiescing of per-CPU vmstats -I conf: inherit task isolation configuration.

To launch an unmodified application:

./chisol -q vmstat_sync -a -I active command args

configure.ac +3 -0
diff -Nur util-linux.orig/configure.ac util-linux/configure.ac
@@ -2272,6 +2272,9 @@
 	[UL_CHECK_SYSCALL([sched_setattr])], [sched_setattr])
 AM_CONDITIONAL([BUILD_UCLAMPSET], [test "x$build_uclampset" = xyes])
 
+UL_ENABLE_ALIAS([chisol], [chisol])
+UL_BUILD_INIT([chisol])
+AM_CONDITIONAL([BUILD_CHISOL], [test "x$build_chisol" = xyes])
 
 AC_ARG_ENABLE([wall],
   AS_HELP_STRING([--disable-wall], [do not build wall]),
schedutils/chisol.c +304 -0

304 lines not on this page · raw message

schedutils/Makemodule.am +8 -0
diff -Nur util-linux.orig/schedutils/Makemodule.am util-linux/schedutils/Makemodule.am
@@ -29,3 +29,11 @@
 uclampset_SOURCES = schedutils/uclampset.c schedutils/sched_attr.h
 uclampset_LDADD = $(LDADD) libcommon.la
 endif
+
+if BUILD_CHISOL
+usrbin_exec_PROGRAMS += chisol
+#MANPAGES += schedutils/chisol.1
+#dist_noinst_DATA += schedutils/chisol.1.adoc
+chisol_SOURCES = schedutils/chisol.c
+chisol_LDADD = $(LDADD) libcommon.la
+endif