提交 da0090ab 编写于 作者: W Wenli Quan

Keep consistent report with x86 for ppc platform.

1.Remove irq_injs and rpkt_per_irq since it's not supported any
more in kvm state

2.Since powerpc doest not support io_exits in kvm state, uses exits
for all platform.

3.Fail to control last numa node by numactl tool in some ppc machine,
so switch to node 0 instead.
Signed-off-by: NWenli Quan <wquan@redhat.com>
上级 76285285
......@@ -13,7 +13,6 @@ from virttest import utils_misc
from virttest import utils_net
from virttest import remote
from virttest import data_dir
from virttest import arch
_netserver_started = False
......@@ -300,11 +299,7 @@ def start_test(server, server_ctl, host, clients, resultsdir, l=60,
record_list = ['size', 'sessions', 'throughput', 'trans.rate', 'CPU',
'thr_per_CPU', 'rx_pkts', 'tx_pkts', 'rx_byts', 'tx_byts',
're_pkts', 'rpkt_per_irq', 'tpkt_per_exit']
if arch.ARCH in ('ppc64', 'ppc64le'):
record_list.append('exits')
else:
record_list.extend(['irq_injs', 'io_exits'])
're_pkts', 'exits', 'tpkt_per_exit']
for i in range(int(params.get("queues", 0))):
record_list.append('rx_intr_%s' % i)
......@@ -354,17 +349,9 @@ def start_test(server, server_ctl, host, clients, resultsdir, l=60,
thu = float(ret['thu'])
cpu = 100 - float(ret['mpstat'].split()[mpstat_index])
normal = thu / cpu
if arch.ARCH in ('ppc64', 'ppc64le'):
if ret.get('tx_pkts') and ret.get('exits'):
ret['tpkt_per_exits'] = float(
ret['tx_pkts']) / float(ret['exits'])
else:
if ret.get('rx_pkts') and ret.get('irq_injs'):
ret['rpkt_per_irq'] = float(
ret['rx_pkts']) / float(ret['irq_injs'])
if ret.get('tx_pkts') and ret.get('io_exits'):
ret['tpkt_per_exit'] = float(
ret['tx_pkts']) / float(ret['io_exits'])
if ret.get('tx_pkt') and ret.get('exits'):
ret['tpkt_per_exit'] = float
(ret['tx_pkts']) / float(ret['exits'])
ret['size'] = int(i)
ret['sessions'] = int(j)
......@@ -534,18 +521,9 @@ def launch_client(sessions, server, server_ctl, host, clients, l, nf_args,
state_list.append('intr')
state_list.append(ninit)
if arch.ARCH in ('ppc64', 'ppc64le'):
exits = int(ssh_cmd(host, "cat /sys/kernel/debug/kvm/exits"))
state_list.append('exits')
state_list.append(exits)
else:
io_exits = int(ssh_cmd(host, "cat /sys/kernel/debug/kvm/io_exits"))
irq_injs = int(
ssh_cmd(host, "cat /sys/kernel/debug/kvm/irq_injections"))
state_list.append('io_exits')
state_list.append(io_exits)
state_list.append('irq_injs')
state_list.append(irq_injs)
return state_list
......@@ -553,8 +531,7 @@ def launch_client(sessions, server, server_ctl, host, clients, l, nf_args,
cmd = ""
fname = "/tmp/netperf.%s.nf" % pid
if numa_enable:
output = ssh_cmd(client_s, "numactl --hardware")
n = re.findall(r"node (\d+) cpus:", output)[-1]
n = abs(int(params.get("numa_node"))) - 1
cmd += "numactl --cpunodebind=%s --membind=%s " % (n, n)
cmd += "/tmp/netperf_agent.py %d %s -D 1 -H %s -l %s %s" % (i,
client_path, server, int(l) * 1.5, nf_args)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册