netdev
[Top] [All Lists]

gettimeofday scalability

To: netdev@xxxxxxxxxxx
Subject: gettimeofday scalability
From: P@xxxxxxxxxxxxxx
Date: Tue, 05 Oct 2004 17:36:06 +0100
Cc: Ingo Molnar <mingo@xxxxxxx>, Andrea Arcangeli <andrea@xxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040124
I'm starting to look again at the performance of my packet sniffer.
Any performace tips are appreciated (I'm using irq affinity and
CONFIG_PACKET_MMAP on 2.4.20 on a dual P4 xeon at present).

In particular I was wondering about reducing the overhead of
calling do_gettimeofday.

I noticed in the following paper that the xeon is much less
efficient than the P3 for gettimeofday (for the syscall at least):
http://www.labs.fujitsu.com/en/techinfo/linux/lse-0211/lse-0211.pdf

I've seen various gettimeofday locking speedup patches floating
around for 2.4. There is a version from Stephen and Andrea
that uses frlock, claiming 18%, and one from ingo that uses brlock.
2.6.8.1 uses seqlock, which contains the comment
that it's not as cache friendly as brlock.

So can anyone summarise the relative merits of these locking
mechanisms, before I start benchmarking?

thanks,
PÃdraig.

<Prev in Thread] Current Thread [Next in Thread>