trafgen: remove timer-based trigger model
commitc139e809f8562a2e9a1e24e86abc5a7c6eee6254
authorDaniel Borkmann <dborkman@redhat.com>
Wed, 26 Mar 2014 13:30:51 +0000 (26 14:30 +0100)
committerDaniel Borkmann <dborkman@redhat.com>
Wed, 26 Mar 2014 13:42:41 +0000 (26 14:42 +0100)
treeb247674a07c3e2c9cbec803818b24655d5c0d1bb
parent51168327bf55a604a6560a2c9838ade8209f816a
trafgen: remove timer-based trigger model

perf reports in mmap case a huge number of kmem_cache_alloc's
which seem to stem from triggering signals from kernel to user
application, against dummy device:

Performance counter stats for 'trafgen -i blub -o dummy0 -n100000000 -k100': <-- mmap case

           175,837 kmem:kmem_cache_alloc

      14.758900522 seconds time elapsed

Performance counter stats for 'trafgen -i blub -o dummy0 -n100000000 -k100 -t0': <-- non-mmap case

               707 kmem:kmem_cache_alloc

      15.591667364 seconds time elapsed

It seems not to case significant number of cache-misses, but
it's better to switch to a direct trigger when we cannot fill
new frames anymore. After this patch, we see a similar number
of kmem_cache_alloc's as in the non-mmap case. This basically
renders the kpull interval useless, we can optionally remove
it if we don't care about people's scripts. ;-)

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
trafgen.c