[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170802105321.3dettvyq4vmcvfth@hirez.programming.kicks-ass.net>
Date: Wed, 2 Aug 2017 12:53:21 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: "Huang, Ying" <ying.huang@...el.com>, linux-kernel@...r.kernel.org,
Ingo Molnar <mingo@...nel.org>,
Michael Ellerman <mpe@...erman.id.au>,
Borislav Petkov <bp@...e.de>,
Thomas Gleixner <tglx@...utronix.de>,
Juergen Gross <jgross@...e.com>, Aaron Lu <aaron.lu@...el.com>
Subject: Re: [PATCH 3/3] IPI: Avoid to use 2 cache lines for one
call_single_data
On Wed, Aug 02, 2017 at 03:18:58AM -0700, Eric Dumazet wrote:
> What we can do instead is to force an alignment on 4*sizeof(void *).
> (32 bytes on 64bit, 16 bytes on 32bit arches)
>
> Maybe something like this :
>
> diff --git a/include/linux/smp.h b/include/linux/smp.h
> index 68123c1fe54918c051292eb5ba3427df09f31c2f..f7072bf173c5456e38e958d6af85a4793bced96e 100644
> --- a/include/linux/smp.h
> +++ b/include/linux/smp.h
> @@ -19,7 +19,7 @@ struct call_single_data {
> smp_call_func_t func;
> void *info;
> unsigned int flags;
> -};
> +} __attribute__((aligned(4 * sizeof(void *))));
Agreed.
Powered by blists - more mailing lists