From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: tim.c.chen@linux.intel.com, andi@firstfloor.org, netdev@vger.kernel.org
Subject: Re: [PATCH net-next-2.6] inetpeer: remove unused list
Date: Thu, 09 Jun 2011 05:47:34 +0200 [thread overview]
Message-ID: <1307591254.3980.32.camel@edumazet-laptop> (raw)
In-Reply-To: <20110608.170557.2273990802892743973.davem@davemloft.net>
Le mercredi 08 juin 2011 à 17:05 -0700, David Miller a écrit :
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Thu, 09 Jun 2011 01:35:34 +0200
>
> > Andi Kleen and Tim Chen reported huge contention on inetpeer
> > unused_peers.lock, on memcached workload on a 40 core machine, with
> > disabled route cache.
> >
> > It appears we constantly flip peers refcnt between 0 and 1 values, and
> > we must insert/remove peers from unused_peers.list, holding a contended
> > spinlock.
> >
> > Remove this list completely and perform a garbage collection on-the-fly,
> > at lookup time, using the expired nodes we met during the tree
> > traversal.
> >
> > This removes a lot of code, makes locking more standard, and obsoletes
> > two sysctls (inet_peer_gc_mintime and inet_peer_gc_maxtime). This also
> > removes two pointers in inet_peer structure.
> >
> > There is still a false sharing effect because refcnt is in first cache
> > line of object [were the links and keys used by lookups are located], we
> > might move it at the end of inet_peer structure to let this first cache
> > line mostly read by cpus.
> >
> > Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
>
> Didn't expect you to implement this so fast :-)
>
> Applied, thanks!
Thanks David
I would be glad to hear about numbers from Andi and Tim, I am very
jealous of their 80 Threads machine ;)
next prev parent reply other threads:[~2011-06-09 3:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20110607221934.GZ27166@one.firstfloor.org>
[not found] ` <1307501024.3102.1.camel@edumazet-laptop>
[not found] ` <20110608025910.GB27166@one.firstfloor.org>
[not found] ` <1307502034.3102.2.camel@edumazet-laptop>
[not found] ` <20110608030739.GC27166@one.firstfloor.org>
[not found] ` <1307504312.3102.9.camel@edumazet-laptop>
[not found] ` <1307507299.3102.15.camel@edumazet-laptop>
[not found] ` <1307509077.3102.20.camel@edumazet-laptop>
[not found] ` <20110608055933.GE27166@one.firstfloor.org>
[not found] ` <1307513916.3102.23.camel@edumazet-laptop>
[not found] ` <1307514470.3102.25.camel@edumazet-laptop>
2011-06-08 23:35 ` [PATCH net-next-2.6] inetpeer: remove unused list Eric Dumazet
2011-06-09 0:05 ` David Miller
2011-06-09 3:47 ` Eric Dumazet [this message]
2011-06-09 5:22 ` David Miller
2011-06-09 5:30 ` 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=1307591254.3980.32.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=andi@firstfloor.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=tim.c.chen@linux.intel.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