mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nadav Amit <nadav.amit@gmail.com>
To: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Andy Lutomirski <luto@amacapital.net>,
	x86@kernel.org, Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	linux-kernel@vger.kernel.org,
	Peter Zijlstra <peterz@infradead.org>,
	Andy Lutomirski <luto@kernel.org>
Subject: Re: [PATCH] x86: Align TLB invalidation info
Date: Wed, 31 Jan 2018 12:52:29 -0800	[thread overview]
Message-ID: <CFEB6DDC-D0C6-4B0C-9679-CB743BDCE3FC@gmail.com> (raw)
In-Reply-To: <1e0c2666-d0ee-8fe2-3272-6b49bf045834@linux.intel.com>

Dave Hansen <dave.hansen@linux.intel.com> wrote:

> On 01/31/2018 12:48 PM, Nadav Amit wrote:
>>>> On Jan 31, 2018, at 12:11 PM, Nadav Amit <namit@vmware.com> wrote:
>>>> 
>>>> The TLB invalidation info is allocated on the stack, which might cause
>>>> it to be unaligned. Since this information may be transferred to
>>>> different cores for TLB shootdown, this might result in an additional
>>>> cache-line bouncing between the cores.
>>>> 
>>>> GCC provides a way to deal with it by using
>>>> __builtin_alloca_with_align(). Use it to avoid the bouncing cache lines.
>>> Eww.  How about __aligned?
>> Err.. Stupid me. For some reason I remembered I tried it and it didn’t have
>> the desired effect, which caused me to assume it does not work for variables
>> on the stack. Anyhow, it does the work. I’ll submit v2.
> 
> Also, just curious, but did you find this situation by inspection or did
> it show up in a profile somewhere?

Actually, not. I considered adding data to info for a different reason
(which eventually I deserted); I was assuming you will all kill me for
increasing the size, so this was a preemption step.

  reply	other threads:[~2018-01-31 20:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-31 20:11 Nadav Amit
2018-01-31 20:24 ` Andy Lutomirski
2018-01-31 20:48   ` Nadav Amit
2018-01-31 20:49     ` Dave Hansen
2018-01-31 20:52       ` Nadav Amit [this message]
2018-01-31 21:00     ` Andy Lutomirski
2018-01-31 21:01 ` Dave Hansen
2018-01-31 21:09   ` Nadav Amit
2018-01-31 21:15     ` Andy Lutomirski
2018-01-31 21:17       ` Nadav Amit
     [not found]     ` <f7270e0d-d1d1-599d-d2c9-ddc2c263e090@linux.intel.com>
2018-02-01  5:38       ` Nadav Amit
2018-02-01  9:38         ` Peter Zijlstra
2018-02-01 18:45           ` Nadav Amit

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=CFEB6DDC-D0C6-4B0C-9679-CB743BDCE3FC@gmail.com \
    --to=nadav.amit@gmail.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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®