[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1354211004.3299.12.camel@edumazet-glaptop>
Date: Thu, 29 Nov 2012 09:43:24 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Jesper Dangaard Brouer <brouer@...hat.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Florian Westphal <fw@...len.de>, netdev@...r.kernel.org,
Pablo Neira Ayuso <pablo@...filter.org>,
Thomas Graf <tgraf@...g.ch>, Cong Wang <amwang@...hat.com>,
Patrick McHardy <kaber@...sh.net>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
Herbert Xu <herbert@...dor.hengli.com.au>
Subject: Re: [net-next PATCH V2 3/9] net: frag, move LRU list maintenance
outside of rwlock
On Thu, 2012-11-29 at 17:12 +0100, Jesper Dangaard Brouer wrote:
> Updating the fragmentation queues LRU (Least-Recently-Used) list,
> required taking the hash writer lock. However, the LRU list isn't
> tied to the hash at all, so we can use a separate lock for it.
>
> This change, in it self, does not improve performance significantly.
> But its part of making the fragmentation code scale.
I would just remove the LRU completely.
All this stuff is 20 years old, we dont need it anymore now we can use
more than 64KB of memory. The design was OK on !SMP
Here is what I would suggest :
Use a schem with a hash table of 256 (or 1024) slots.
Each slot/bucket has :
- Its own spinlock.
- List of items
- A limit of 5 (or so) elems in the list.
No more LRU, no more rehash (thanks to jhash and the random seed at boot
or first frag created), no more reader-writer lock.
Use a percpu_counter to implement ipfrag_low_thresh/ipfrag_high_thresh
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists