commit db2156eaddeafec0523aeccda45447b3069eb059 Author: Jim Gauld Date: Fri Oct 16 15:41:34 2020 -0400 Affine kswapd* kernel threads to platform cores The kswapd* kernel tasks are per NUMA node and have floating cpu affinity masks spanning those nodes. On AIO low-latency systems, this affines the kswapd* kernel tasks to platform cores. This is a performance improvement for low-latency sensitive applications. Partial-Bug: 1900174 Change-Id: I20db19978362997b23a69bf591b8e7c23096f492 Signed-off-by: Jim Gauld diff --git a/utilities/worker-utils/worker-utils/affine-platform.sh b/utilities/worker-utils/worker-utils/affine-platform.sh index 72a7d63..4de4236 100755 --- a/utilities/worker-utils/worker-utils/affine-platform.sh +++ b/utilities/worker-utils/worker-utils/affine-platform.sh @@ -111,6 +111,11 @@ function affine_tasks { taskset --all-tasks --pid --cpu-list ${PLATFORM_CPULIST} $pid &> /dev/null done + # Affine kernel kswapd threads to platform cores + pidlist=$(ps --ppid 2 -p 2 -o pid=,comm= | grep -E 'kswapd' | awk '{ print $1; }') + for pid in ${pidlist[@]}; do + taskset --all-tasks --pid --cpu-list ${PLATFORM_CPULIST} $pid &> /dev/null + done fi return 0