From c1087732a0cbb19866e1c864bcd31f3c7bba50fa Mon Sep 17 00:00:00 2001 From: Eric MacDonald Date: Fri, 13 May 2022 16:21:01 +0000 Subject: [PATCH] Debian KS: Force enable lowlatency trait if realtime kernel is detected If the lowlatency trait is not specified yet the running kernel is RT then force enable the lowlatency trait. Test Plan: PASS: Verify Debian build and install PASS: Verify lowlatency trait force enable PASS: Verify no force enable when kernel is not RT PASS: Verify no force enable when lowlatency is already specified and RT kernel is present Story: 2009301 Task: 45369 Signed-off-by: Eric MacDonald Change-Id: Ic5708001e80714ddf8a9c2bd774e487a5508b02e --- kickstart/files/kickstart.cfg | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/kickstart/files/kickstart.cfg b/kickstart/files/kickstart.cfg index 2374e3ee..a9a98223 100644 --- a/kickstart/files/kickstart.cfg +++ b/kickstart/files/kickstart.cfg @@ -651,6 +651,17 @@ for trait in ${traits//,/ }; do esac done +ilog "Install traits: $traits" + +# Force enable 'lowlatency' trait if the realtime kernel is detected ; PREEMPT_RT +uname=$(uname -a) +if [[ "${uname}" == *"PREEMPT_RT"* ]] ; then + if [ "${lowlatency}" = false ] ; then + wlog "forcing lowlatency trait after discovering the RT kernel" + lowlatency=true + fi +fi + [ "${controller}" = true -a "${worker}" = true ] && aio=true grep -q 'debug_kickstart' /proc/cmdline @@ -1378,8 +1389,6 @@ for e in $*; do done fi -ilog "Install traits: $traits" - # Set node traits' state [ "${controller}" = true ] && ilog "Controller Function" [ "${storage}" = true ] && ilog "Storage Function"