1
0
Fork 0

Merge pull request #255 from yarda/rhbz1797025

realtime: added support for managed_irq
This commit is contained in:
Jaroslav Škarvada 2020-03-23 15:35:34 +01:00 committed by GitHub
commit 751cdb497b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 32 additions and 1 deletions

View file

@ -2,3 +2,10 @@
# isolated_cores=2,4-7
# isolated_cores=2-23
#
#
# Uncomment the 'isolate_managed_irq=Y' bellow if you want to move kernel
# managed IRQs out of isolated cores. Note that this requires kernel
# support. Please only specify this parameter if you are sure that the
# kernel supports it.
#
# isolate_managed_irq=Y

View file

@ -28,6 +28,9 @@ isolated_cores_online_expanded=${f:cpulist_online:${isolated_cores}}
# Fail if isolated_cores contains CPUs which are not online
assert2=${f:assertion:isolated_cores contains online CPU(s):${isolated_cores_expanded}:${isolated_cores_online_expanded}}
# Assembly managed_irq
managed_irq=${f:regex_search_ternary:${isolate_managed_irq}:\b[y,Y,1,t,T]\b:managed_irq,domain,:}
[sysctl]
kernel.hung_task_timeout_secs = 600
kernel.nmi_watchdog = 0
@ -41,7 +44,7 @@ kernel.timer_migration = 0
/sys/devices/system/machinecheck/machinecheck*/ignore_ce = 1
[bootloader]
cmdline_realtime=+isolcpus=${isolated_cores} intel_pstate=disable nosoftlockup tsc=nowatchdog
cmdline_realtime=+isolcpus=${managed_irq}${isolated_cores} intel_pstate=disable nosoftlockup tsc=nowatchdog
[script]
script = ${i:PROFILE_DIR}/script.sh

View file

@ -0,0 +1,21 @@
import re
from . import base
class regex_search_ternary(base.Function):
"""
Ternary regex operator, it takes arguments in the following form
STR1, REGEX, STR2, STR3
If REGEX matches STR1 (re.search is used), STR2 is returned,
otherwise STR3 is returned
"""
def __init__(self):
# 4 arguments
super(regex_search_ternary, self).__init__("regex_search_ternary", 4)
def execute(self, args):
if not super(regex_search_ternary, self).execute(args):
return None
if re.search(args[1], args[0]):
return args[2]
else:
return args[3]