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: <20121207095907.GA5129@osiris.de.ibm.com>
Date:	Fri, 7 Dec 2012 10:59:07 +0100
From:	Heiko Carstens <heiko.carstens@...ibm.com>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	linux-kernel@...r.kernel.org, stable@...r.kernel.org,
	alan@...rguk.ukuu.org.uk,
	Martin Schwidefsky <schwidefsky@...ibm.com>,
	CAI Qian <caiqian@...hat.com>
Subject: Re: [ 15/20] s390/mm: have 16 byte aligned struct pages

On Thu, Dec 06, 2012 at 04:54:30PM -0800, Greg Kroah-Hartman wrote:
> 3.4-stable review patch.  If anyone has any objections, please let me know.
> 
> ------------------
> 
> From: Heiko Carstens <heiko.carstens@...ibm.com>
> 
> commit 4bffbb3455372a26816e364fb4448810f7014452 upstream.
> 
> Select HAVE_ALIGNED_STRUCT_PAGE on s390, so that the slub allocator can make
> use of compare and swap double for lockless updates. This increases the size

The s390 implementation of compare and swap and double was merged for 3.7:
b1d6b40c "s390/cmpxchg,percpu: implement cmpxchg_double()".
It is not part of 3.4. So putting this into stable makes not much sense.

> of struct page to 64 bytes (instead of 56 bytes), however the performance gain
> justifies the increased size:
> 
> - now excactly four struct pages fit into a single cache line; the
>   case that accessing a struct page causes two cache line loads
>   does not exist anymore.
> - calculating the offset of a struct page within the memmap array
>   is only a simple shift instead of a more expensive multiplication.

This is obviously still true, but I've made no measurements if we still
see any (significant) performance gain if the slub allocator doesn't make
use of compare and swap double or if it's just a waste of memory.

So I'd prefer to not have this patch in stable.

> A "hackbench 200 process 200" run on a 32 cpu system did show an 8% runtime
> improvement.
> 
> Signed-off-by: Heiko Carstens <heiko.carstens@...ibm.com>
> Signed-off-by: Martin Schwidefsky <schwidefsky@...ibm.com>
> Signed-off-by: CAI Qian <caiqian@...hat.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> 
> ---
>  arch/s390/Kconfig |    1 +
>  1 file changed, 1 insertion(+)
> 
> --- a/arch/s390/Kconfig
> +++ b/arch/s390/Kconfig
> @@ -93,6 +93,7 @@ config S390
>  	select ARCH_SAVE_PAGE_KEYS if HIBERNATION
>  	select HAVE_MEMBLOCK
>  	select HAVE_MEMBLOCK_NODE_MAP
> +	select HAVE_ALIGNED_STRUCT_PAGE if SLUB
>  	select ARCH_DISCARD_MEMBLOCK
>  	select ARCH_INLINE_SPIN_TRYLOCK
>  	select ARCH_INLINE_SPIN_TRYLOCK_BH

--
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