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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1238489352.26587.40.camel@penberg-laptop>
Date:	Tue, 31 Mar 2009 11:49:11 +0300
From:	Pekka Enberg <penberg@...helsinki.fi>
To:	David Rientjes <rientjes@...gle.com>
Cc:	Christoph Lameter <cl@...ux.com>,
	Nick Piggin <nickpiggin@...oo.com.au>,
	Martin Bligh <mbligh@...gle.com>, linux-kernel@...r.kernel.org
Subject: Re: [patch 2/3] slub: scan partial list for free slabs when
	thrashing

Hi David,

On Mon, 2009-03-30 at 10:37 -0400, Christoph Lameter wrote:
> > > That adds fastpath overhead and it shows for small objects in your tests.

On Tue, 31 Mar 2009, Pekka Enberg wrote:
> > Yup, and looking at this:
> > 
> > +       u16 fastpath_allocs;    /* Consecutive fast allocs before slowpath */
> > +       u16 slowpath_allocs;    /* Consecutive slow allocs before watermark */
> > 
> > How much do operations on u16 hurt on, say, x86-64?

On Tue, 2009-03-31 at 01:23 -0700, David Rientjes wrote:
> As opposed to unsigned int?  These simply use the word variations of the 
> mov, test, cmp, and inc instructions instead of long.  It's the same 
> tradeoff when using the u16 slub fields within struct page except it's not 
> strictly required in this instance because of size limitations, but rather 
> for cacheline optimization.

I was thinking of partial register stalls. But looking at it on x86-64,
the generated asm seems sane. I see tons of branch instructions, though,
so simplifying this somehow:

+       if (is_empty) {
+               if (c->fastpath_allocs < s->min_free_watermark)
+                       c->slowpath_allocs++;
+               else if (c->slowpath_allocs)
+                       c->slowpath_allocs--;
+       } else
+               c->slowpath_allocs = 0;
+       c->fastpath_allocs = 0;

would be most welcome.

			Pekka

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ