[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200626131145.GK4800@hirez.programming.kicks-ass.net>
Date: Fri, 26 Jun 2020 15:11:45 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Stafford Horne <shorne@...il.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
"Paul E. McKenney" <paulmck@...nel.org>,
Marco Elver <elver@...gle.com>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Ingo Molnar <mingo@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Mike Rapoport <rppt@...ux.ibm.com>,
Sami Tolvanen <samitolvanen@...gle.com>
Subject: Re: [PATCH] init: Align init_task to avoid conflict with MUTEX_FLAGS
On Fri, Jun 26, 2020 at 08:45:22PM +0900, Stafford Horne wrote:
> I think we can make this unconditional. The only reason I used the condition is
> because the only architecture that sets CONFIG_ARCH_TASK_STRUCT_ON_STACK is ia64
> which already has 64-bit alignment.
>
> I can change it to (not incorporating max_t(ARCH_MIN_TASKALIGN) as not sure how):
The only arch that has ARCH_MIN_TASKALIGN larger than L1_CACHE_SIZE is
some daft x86 config and it shouldn't be fatal to them.
So with this:
Acked-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> diff --git a/init/init_task.c b/init/init_task.c
> index 15089d15010a..ab6173f8e6a8 100644
> --- a/init/init_task.c
> +++ b/init/init_task.c
> @@ -65,6 +65,7 @@ struct task_struct init_task
> #ifdef CONFIG_ARCH_TASK_STRUCT_ON_STACK
> __init_task_data
> #endif
> + __aligned(L1_CACHE_BYTES)
> = {
> #ifdef CONFIG_THREAD_INFO_IN_TASK
> .thread_info = INIT_THREAD_INFO(init_task),
>
> -Stafford
Powered by blists - more mailing lists