diff options
author | Jesper Dangaard Brouer <brouer@redhat.com> | 2014-06-26 13:16:49 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-07-01 15:50:23 -0700 |
commit | baac167b706600ebe7158acaeb7c489ae9d0bb8b (patch) | |
tree | e7fe4f63eb410252d15ef5536e97a4adc08fc881 /net/core/tso.c | |
parent | 9ceb87fceacca86a37f189b84b79797c313b0c03 (diff) | |
download | blackbird-op-linux-baac167b706600ebe7158acaeb7c489ae9d0bb8b.tar.gz blackbird-op-linux-baac167b706600ebe7158acaeb7c489ae9d0bb8b.zip |
pktgen: avoid expensive set_current_state() call in loop
Avoid calling set_current_state() inside the busy-loop in
pktgen_thread_worker(). In case of pkt_dev->delay, then it is still
used/enabled in pktgen_xmit() via the spin() call.
The set_current_state(TASK_INTERRUPTIBLE) uses a xchg, which implicit
is LOCK prefixed. I've measured the asm LOCK operation to take approx
8ns on this E5-2630 CPU. Performance increase corrolate with this
measurement.
Performance data with CLONE_SKB==100000, rx-usecs=30:
(single CPU performance, ixgbe 10Gbit/s, E5-2630)
* Prev: 5454050 pps --> 183.35ns (1/5454050*10^9)
* Now: 5684009 pps --> 175.93ns (1/5684009*10^9)
* Diff: +229959 pps --> -7.42ns
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/tso.c')
0 files changed, 0 insertions, 0 deletions