From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Richard Weinberger <richard@nod.at>,
Andy Lutomirski <luto@amacapital.net>,
Darren Hart <darren@dvhart.com>, Oleg Nesterov <oleg@redhat.com>,
Michael Kerrisk <mtk.manpages@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] futex: eliminate cache miss from futex_hash()
Date: Mon, 22 Jun 2015 15:45:10 +0200 [thread overview]
Message-ID: <87616fluvt.fsf@rasmusvillemoes.dk> (raw)
In-Reply-To: <20150622133327.GT3644@twins.programming.kicks-ass.net> (Peter Zijlstra's message of "Mon, 22 Jun 2015 15:33:27 +0200")
On Mon, Jun 22 2015, Peter Zijlstra <peterz@infradead.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/
next prev parent reply other threads:[~2015-06-22 13:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-22 13:16 Rasmus Villemoes
2015-06-22 13:16 ` [not-a-PATCH 2/2] futex: eliminate instruction from hash_futex Rasmus Villemoes
2015-06-22 13:33 ` [PATCH 1/2] futex: eliminate cache miss from futex_hash() Peter Zijlstra
2015-06-22 13:45 ` Rasmus Villemoes [this message]
2015-06-22 13:55 ` Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87616fluvt.fsf@rasmusvillemoes.dk \
--to=linux@rasmusvillemoes.dk \
--cc=akpm@linux-foundation.org \
--cc=darren@dvhart.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mtk.manpages@gmail.com \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=richard@nod.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®