realtime: added support for netdev_queue_count
This allows the user to adjust the queue count for each network device. Also add check_net_queue_count built-in function. The functions check if the user has specified any queue count value or not. If no value is passed the function returns the number of housekeeping CPUs as the queue count. Resolves: rhbz#1846767 Signed-off-by: Nitesh Narayan Lal <nitesh@redhat.com>
This commit is contained in:
parent
0ab1f8cc3f
commit
c002d93b59
3 changed files with 33 additions and 0 deletions
|
|
@ -9,3 +9,11 @@
|
|||
# kernel supports it.
|
||||
#
|
||||
# isolate_managed_irq=Y
|
||||
#
|
||||
#
|
||||
# Set the desired combined queue count value using the parameter provided
|
||||
# below. Ideally this should be set to the number of housekeeping CPUs i.e.,
|
||||
# in the example given below it is assumed that the system has 4 housekeeping
|
||||
# (non-isolated) CPUs.
|
||||
#
|
||||
# netdev_queue_count=4
|
||||
|
|
|
|||
|
|
@ -35,6 +35,9 @@ assert2=${f:assertion:isolated_cores contains online CPU(s):${isolated_cores_exp
|
|||
isolate_managed_irq = ${isolate_managed_irq}
|
||||
managed_irq=${f:regex_search_ternary:${isolate_managed_irq}:\b[y,Y,1,t,T]\b:managed_irq,domain,:}
|
||||
|
||||
[net]
|
||||
channels=combined ${f:check_net_queue_count:${netdev_queue_count}}
|
||||
|
||||
[sysctl]
|
||||
kernel.hung_task_timeout_secs = 600
|
||||
kernel.nmi_watchdog = 0
|
||||
|
|
|
|||
22
tuned/profiles/functions/function_check_net_queue_count.py
Normal file
22
tuned/profiles/functions/function_check_net_queue_count.py
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import tuned.logs
|
||||
from . import base
|
||||
|
||||
log = tuned.logs.get()
|
||||
|
||||
class check_net_queue_count(base.Function):
|
||||
"""
|
||||
Checks whether the user has specified a queue count for net devices. If
|
||||
not, return the number of housekeeping CPUs.
|
||||
"""
|
||||
def __init__(self):
|
||||
# 1 argument
|
||||
super(check_net_queue_count, self).__init__("check_net_queue_count", 1, 1)
|
||||
|
||||
def execute(self, args):
|
||||
if not super(check_net_queue_count, self).execute(args):
|
||||
return None
|
||||
if args[0].isdigit():
|
||||
return args[0]
|
||||
(ret, out) = self._cmd.execute(["nproc"])
|
||||
log.warn("net-dev queue count is not correctly specified, setting it to HK CPUs %s" % (out))
|
||||
return out
|
||||
Loading…
Reference in a new issue