From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: shemminger@vyatta.com, netdev@vger.kernel.org
Subject: Re: [PATCH] inet_peer: Optimize inet_getid()
Date: Mon, 05 Oct 2009 00:08:18 -0700 (PDT) [thread overview]
Message-ID: <20091005.000818.95127796.davem@davemloft.net> (raw)
In-Reply-To: <4ABBDA45.2040109@gmail.com>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 24 Sep 2009 22:44:53 +0200
> [PATCH] inet_peer: Optimize inet_getid()
>
> While investigating for network latencies, I found inet_getid() was a contention point
> for some workloads.
>
> If __HAVE_ARCH_CMPXCHG is defined, we can use cmpxchg() instead of
> a spin_lock_bh()/spin_unlock_bh() pair on a central lock.
>
> On other arches, we can use an atomic_t instead of a u16,
> and atomic_add_return(). This might grow memory usage a bit, unless
> someone invents atomic16_t :)
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
I can't apply this, it's going to break the build on some
architectures.
For example, sparc64 only supports cmpxchg on u32 and u64
objects, but you're trying to use it on a u16 here.
next prev parent reply other threads:[~2009-10-05 7:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-24 19:04 [PATCH] inet_peer: Optimize inet_getid() Eric Dumazet
2009-09-24 19:30 ` Stephen Hemminger
2009-09-24 19:57 ` Eric Dumazet
2009-09-24 20:44 ` Eric Dumazet
2009-10-05 7:08 ` David Miller [this message]
2009-10-05 7:38 ` Eric Dumazet
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=20091005.000818.95127796.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.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).