From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next] neigh: speedup neigh_resolve_output()
Date: Mon, 11 Oct 2010 21:46:01 +0200 [thread overview]
Message-ID: <1286826361.3218.14.camel@edumazet-laptop> (raw)
In-Reply-To: <20101011.121609.246536311.davem@davemloft.net>
Le lundi 11 octobre 2010 à 12:16 -0700, David Miller a écrit :
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Thu, 07 Oct 2010 22:44:07 +0200
>
> > Le jeudi 07 octobre 2010 à 14:53 +0200, Eric Dumazet a écrit :
> >
> >> Further improvements would need to use a seqlock instead of an rwlock to
> >> protect neigh->ha[], to not dirty neigh too often and remove two atomic
> >> ops.
> >>
> >
> > I implemented this idea in following patch, on top on previous one.
> >
> > [PATCH net-next] neigh: speedup neigh_resolve_output()
>
> So Eric do you think this is more efficient than the idea I
> proposed, which is to "cmpxchg 'hh' and RCU"?
>
> If you think this seqlock thing is faster or more desirable
> for some reason, I'll add it.
>
> Thanks!
Hmm, we would need a neigh->ha pointer to some struct, with rcu
protection. It adds a dereference in hot path. I believe this seqlock
(only for pathological cases, where dst are used for few packets) should
be fine.
Note: After this patch, I have a "struct neighbour" small field reorg
pending, not yet submitted.
Thanks
next prev parent reply other threads:[~2010-10-11 19:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-07 12:53 [PATCH net-next] neigh: speedup neigh_hh_init() Eric Dumazet
2010-10-07 20:44 ` [PATCH net-next] neigh: speedup neigh_resolve_output() Eric Dumazet
2010-10-11 19:16 ` David Miller
2010-10-11 19:46 ` Eric Dumazet [this message]
2010-10-11 20:01 ` David Miller
2010-10-11 22:02 ` [PATCH net-next] neigh: reorder struct neighbour fields Eric Dumazet
2010-10-11 22:20 ` Eric Dumazet
2010-10-11 23:09 ` David Miller
2010-10-11 16:18 ` [PATCH net-next] neigh: speedup neigh_hh_init() 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=1286826361.3218.14.camel@edumazet-laptop \
--to=eric.dumazet@gmail.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