[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AE90C24D6B3A694183C094C60CF0A2F6026B70E2@saturn3.aculab.com>
Date: Thu, 6 Dec 2012 13:29:13 -0000
From: "David Laight" <David.Laight@...LAB.COM>
To: "Florian Westphal" <fw@...len.de>,
"Jesper Dangaard Brouer" <jbrouer@...hat.com>
Cc: "Eric Dumazet" <eric.dumazet@...il.com>,
"David S. Miller" <davem@...emloft.net>, <netdev@...r.kernel.org>,
"Thomas Graf" <tgraf@...g.ch>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
"Cong Wang" <amwang@...hat.com>,
"Herbert Xu" <herbert@...dor.hengli.com.au>
Subject: RE: [net-next PATCH V3-evictor] net: frag evictor, avoid killing warm frag queues
> Jesper Dangaard Brouer <jbrouer@...hat.com> wrote:
> > CPUs are fighting for the same LRU head (inet_frag_queue) element,
> > which is bad for scalability. We could fix this by unlinking the
> > element once a CPU graps it, but it would require us to change a
> > read_lock to a write_lock, thus we might not gain much performance.
> >
> > I already (implicit) fix this is a later patch, where I'm moving the
> > LRU lists to be per CPU. So, I don't know if it's worth fixing.
>
> Do you think its worth trying to remove the lru list altogether and
> just evict from the hash in a round-robin fashion instead?
Round-robin will be the same as LRU under overload - so have the
same issues.
Random might be better - especially if IP datagrams for which
more than one in-sequence packet have been received are moved
to a second structure.
But you still need something to control the total memory use.
NFS/UDP is about the only thing that generates very large
IP datagrams - and no one in their right mind runs that
over non-local links.
For SMP you might hash to a small array of pointers (to fragments)
each having its own lock. Only evict items with the same hash.
Put the id in the array and you probably won't need to look at
the actual fragment (saving a cache miss) unless it is the one
you want.
David
--
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