lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 25 Apr 2013 13:57:28 +0100
From:	"David Laight" <David.Laight@...LAB.COM>
To:	"Jesper Dangaard Brouer" <brouer@...hat.com>
Cc:	"David S. Miller" <davem@...emloft.net>,
	"Hannes Frederic Sowa" <hannes@...essinduktion.org>,
	<netdev@...r.kernel.org>, "Eric Dumazet" <eric.dumazet@...il.com>
Subject: RE: [net-next PATCH 0/4] net: frag patchset for fixing LRU scalabilityissue

> On Wed, 2013-04-24 at 17:21 +0100, David Laight wrote:
> > > I have dropped the idea of doing "direct hash cleaning".  Instead I
> > > have simply choosen to solve the global LRU list problem, by making
> > > the LRU list be per CPU.
> >
> > How can a per-cpu LRU list work?
> > I see two immediate problems:
> > - Ensuring the normal 'allocate' and 'free' are always done
> >   on the same cpu (free will need to remove items from any
> >   LRU list).
> > - Ensuring that there all the items aren't on the LRU lists
> >   of other cpus - meaning one can't be allocated.
> >
> > The only way this could work is if the allocation limit
> > is also per-cpu and you can guarantee that the alloc and
> > free for any given item will always happen on the same cpu.
> >
> > (alloc as in 'add to LRU list, free as in 'remove from LRU list).
> 
> Please read patch-04.
> 
> I've added "cpu_alloc" to record the CPU were the first fragment got
> allocated.  After which all frags gets accounted to that CPU,
> add/remove/timeout etc.

Hmmm... the general idea behind making anything 'per-cpu' is so
that locking isn't required.
If you end up doing the 'remove' accounting on a different cpu then
all the actions require locks - which makes per-cpu data more or
less pointless.

In which case you are much better off using a hash to determine
the list.

	David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ