netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@osdl.org>
To: P@draigBrady.com
Cc: netdev@oss.sgi.com, Ingo Molnar <mingo@elte.hu>,
	Andrea Arcangeli <andrea@suse.de>
Subject: Re: gettimeofday scalability
Date: Tue, 05 Oct 2004 11:48:00 -0700	[thread overview]
Message-ID: <1097002080.22947.18.camel@localhost.localdomain> (raw)
In-Reply-To: <4162CD76.4070204@draigBrady.com>

On Tue, 2004-10-05 at 17:36 +0100, P@draigBrady.com wrote:
> 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.

Don't bother with doing new work on 2.4. Look at 2.6.
You could use TSC in user space but you aren't going to see absolute
times and you run into all the portablity, and possible speed change
issues.

> So can anyone summarise the relative merits of these locking
> mechanisms, before I start benchmarking?
> 
> thanks,
> Pádraig.

  parent reply	other threads:[~2004-10-05 18:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-05 16:36 gettimeofday scalability P
2004-10-05 18:35 ` David S. Miller
2004-10-05 18:48 ` Stephen Hemminger [this message]
2004-10-05 18:55 ` Andrea Arcangeli
2004-10-05 19:16   ` P
2004-10-05 19:35     ` Andrea Arcangeli
2004-10-05 19:18 ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1097002080.22947.18.camel@localhost.localdomain \
    --to=shemminger@osdl.org \
    --cc=P@draigBrady.com \
    --cc=andrea@suse.de \
    --cc=mingo@elte.hu \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).