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]
Date:	Mon, 22 Jun 2015 15:45:10 +0200
From:	Rasmus Villemoes <linux@...musvillemoes.dk>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Richard Weinberger <richard@....at>,
	Andy Lutomirski <luto@...capital.net>,
	Darren Hart <darren@...art.com>,
	Oleg Nesterov <oleg@...hat.com>,
	Michael Kerrisk <mtk.manpages@...il.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] futex: eliminate cache miss from futex_hash()

On Mon, Jun 22 2015, Peter Zijlstra <peterz@...radead.org> wrote:

> On Mon, Jun 22, 2015 at 03:16:18PM +0200, Rasmus Villemoes wrote:
>> +static struct {
>> +	struct futex_hash_bucket *queues;
>> +	unsigned long            hashsize;
>> +} __futex_data __read_mostly __aligned(16);
>
> Does: __aligned(sizeof(__futex_data)), work?
>

Unfortunately not:

kernel/futex.c:265:30: error: ‘__futex_data’ undeclared here (not in a function)
kernel/futex.c:265:1: error: requested alignment is not an integer constant

> Because 16 might waste 8 bytes on 32bit.

Yeah, wasting >= 48 bytes was the reason I didn't make it
____cacheline_aligned. If 8 bytes is also too much, I suppose one could
just give the struct a tag and then use sizeof(struct futex_data).

Rasmus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ