From: Ondrej Lichtner <olichtne(a)redhat.com>
This will me split off into it's own ConfigMixin class.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Recipes/ENRT/BaseEnrtRecipe.py | 36 ---------------------------
lnst/Recipes/ENRT/SimplePerfRecipe.py | 11 --------
2 files changed, 47 deletions(-)
diff --git a/lnst/Recipes/ENRT/BaseEnrtRecipe.py b/lnst/Recipes/ENRT/BaseEnrtRecipe.py
index cacbd94..6582751 100644
--- a/lnst/Recipes/ENRT/BaseEnrtRecipe.py
+++ b/lnst/Recipes/ENRT/BaseEnrtRecipe.py
@@ -41,7 +41,6 @@ class BaseEnrtRecipe(BaseSubConfigMixin, PingTestAndEvaluate,
PerfRecipe):
mtu = IntParam(mandatory=False)
- dev_intr_cpu = IntParam(mandatory=False)
perf_tool_cpu = IntParam(mandatory=False)
perf_duration = IntParam(default=60)
@@ -262,38 +261,3 @@ def _create_reverse_ping(self, pconf):
interval = pconf.ping_interval,
size = pconf.ping_psize,
)
-
- def _pin_dev_interrupts(self, dev, cpu):
- netns = dev.netns
- cpu_info = netns.run("lscpu", job_level=ResultLevel.DEBUG).stdout
- regex = "CPU\(s\): *([0-9]*)"
- num_cpus = int(re.search(regex, cpu_info).groups()[0])
- if cpu < 0 or cpu > num_cpus - 1:
- raise RecipeError("Invalid CPU value given: %d. Accepted value %s."
%
- (cpu, "is: 0" if num_cpus == 1 else "are:
0..%d" %
- (num_cpus - 1)))
-
- res = netns.run(
- "grep {} /proc/interrupts | cut -f1 -d: | sed 's/
//'".format(
- dev.name
- ),
- job_level=ResultLevel.DEBUG,
-
- )
- intrs = res.stdout
- split = res.stdout.split("\n")
- if len(split) == 1 and split[0] == "":
- res = netns.run(
- "dev_irqs=/sys/class/net/{}/device/msi_irqs; "
- "[ -d $dev_irqs ] && ls -1
$dev_irqs".format(dev.name),
- job_level=ResultLevel.DEBUG,
- )
- intrs = res.stdout
-
- for intr in intrs.split("\n"):
- try:
- int(intr)
- netns.run("echo -n {} > /proc/irq/{}/smp_affinity_list"
- .format(cpu, intr.strip()))
- except:
- pass
diff --git a/lnst/Recipes/ENRT/SimplePerfRecipe.py
b/lnst/Recipes/ENRT/SimplePerfRecipe.py
index 263bc83..05e2828 100644
--- a/lnst/Recipes/ENRT/SimplePerfRecipe.py
+++ b/lnst/Recipes/ENRT/SimplePerfRecipe.py
@@ -47,12 +47,6 @@ def test_wide_configuration(self):
for host in [host1, host2]:
host.eth0.adaptive_tx_coalescing = self.params.adaptive_tx_coalescing
- #TODO better service handling through HostAPI
- if "dev_intr_cpu" in self.params:
- for host in [host1, host2]:
- host.run("service irqbalance stop")
- self._pin_dev_interrupts(host.eth0, self.params.dev_intr_cpu)
-
if self.params.perf_parallel_streams > 1:
for host in [host1, host2]:
host.run("tc qdisc replace dev %s root mq" % host.eth0.name)
@@ -61,8 +55,3 @@ def test_wide_configuration(self):
def test_wide_deconfiguration(self, config):
host1, host2 = self.matched.host1, self.matched.host2
-
- #TODO better service handling through HostAPI
- if "dev_intr_cpu" in self.params:
- for host in [host1, host2]:
- host.run("service irqbalance start")
--
2.22.0