plugin_net: Allow disabling dynamic tuning
The net plugin can now be given the boolean 'dynamic' option, which is used to determine, whether dynamic tuning should be enabled. Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
This commit is contained in:
parent
cf87220216
commit
7e7b1ee878
1 changed files with 11 additions and 5 deletions
|
|
@ -38,11 +38,16 @@ class NetTuningPlugin(base.Plugin):
|
|||
|
||||
def _instance_init(self, instance):
|
||||
instance._has_static_tuning = True
|
||||
instance._has_dynamic_tuning = True
|
||||
|
||||
instance._load_monitor = self._monitors_repository.create("net", instance.devices)
|
||||
instance._idle = {}
|
||||
instance._stats = {}
|
||||
if self._option_bool(instance.options["dynamic"]):
|
||||
instance._has_dynamic_tuning = True
|
||||
instance._load_monitor = self._monitors_repository.create("net", instance.devices)
|
||||
instance._idle = {}
|
||||
instance._stats = {}
|
||||
else:
|
||||
instance._has_dynamic_tuning = False
|
||||
instance._load_monitor = None
|
||||
instance._idle = None
|
||||
instance._stats = None
|
||||
|
||||
def _instance_cleanup(self, instance):
|
||||
if instance._load_monitor is not None:
|
||||
|
|
@ -120,6 +125,7 @@ class NetTuningPlugin(base.Plugin):
|
|||
@classmethod
|
||||
def _get_config_options(cls):
|
||||
return {
|
||||
"dynamic": True,
|
||||
"wake_on_lan": None,
|
||||
"nf_conntrack_hashsize": None,
|
||||
"features": None,
|
||||
|
|
|
|||
Loading…
Reference in a new issue