netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@osdl.org>
To: Eric Dumazet <dada1@cosmosbay.com>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [PATCH] convert hh_lock to seqlock
Date: Thu, 7 Dec 2006 14:53:00 -0800	[thread overview]
Message-ID: <20061207145300.3a5a21a6@localhost> (raw)
In-Reply-To: <45789534.1050703@cosmosbay.com>

On Thu, 07 Dec 2006 23:27:00 +0100
Eric Dumazet <dada1@cosmosbay.com> wrote:

> Stephen Hemminger a écrit :
> > On Thu, 07 Dec 2006 21:23:07 +0100
> > Eric Dumazet <dada1@cosmosbay.com> wrote:
> > 
> >> Stephen Hemminger a écrit :
> >>> The hard header cache is in the main output path, so using
> >>> seqlock instead of reader/writer lock should reduce overhead.
> >>>
> >> Nice work Stephen, I am very interested.
> >>
> >> Did you benchmarked it ?
> >>
> >> I ask because I think hh_refcnt frequent changes may defeat the gain you want 
> >> (ie avoiding cache line ping pongs between cpus). seqlock are definitly better 
> >> than rwlock, but if we really keep cache lines shared.
> >>
> >> So I would suggest reordering fields of hh_cache and adding one 
> >> ____cacheline_aligned_in_smp to keep hh_refcnt in another cache line.
> >>
> >> (hh_len, hh_lock and hh_data should be placed on a 'mostly read' cache line)
> >>
> >> Thank you
> >> Eric
> > 
> > It doesn't make any visible performance difference for real networks; 
> > copies and device issues are much larger.
> 
> Hum, so 'my' machines must be unreal :)
> 
> > 
> > The hh_refcnt is used only when creating destroying neighbor entries,
> > so except under DoS attack it doesn't make a lot of difference.
> > The hh_lock is used on each packet sent.
> 
> Some machines create/delete 10.000 entries per second in rt_cache.
> I believe they are real. DoS ? you tell it, some people wont agree.


That could be fixed by doing RCU, I did some of that previously, but it
seemed better to hit the worst case first.  Even Robert doesn't see 10,000
rt cache entries per second.

  reply	other threads:[~2006-12-07 22:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-07 19:33 [PATCH] convert hh_lock to seqlock Stephen Hemminger
2006-12-07 20:23 ` Eric Dumazet
2006-12-07 21:15   ` Stephen Hemminger
2006-12-07 22:27     ` Eric Dumazet
2006-12-07 22:53       ` Stephen Hemminger [this message]
2006-12-07 23:02         ` Eric Dumazet
2006-12-07 23:07           ` David Miller
2006-12-08  8:06             ` [PATCH] NET : force a cache line split in hh_cache in SMP Eric Dumazet
2006-12-08  8:08               ` David Miller
2006-12-07 23:08 ` [PATCH] convert hh_lock to seqlock David Miller

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=20061207145300.3a5a21a6@localhost \
    --to=shemminger@osdl.org \
    --cc=dada1@cosmosbay.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /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).