public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Stafford Horne <shorne@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	"Paul E. McKenney" <paulmck@kernel.org>,
	Marco Elver <elver@google.com>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Ingo Molnar <mingo@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Mike Rapoport <rppt@linux.ibm.com>,
	Sami Tolvanen <samitolvanen@google.com>
Subject: Re: [PATCH] init: Align init_task to avoid conflict with MUTEX_FLAGS
Date: Fri, 26 Jun 2020 15:11:45 +0200	[thread overview]
Message-ID: <20200626131145.GK4800@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20200626114522.GI1401039@lianli.shorne-pla.net>

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@infradead.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

      reply	other threads:[~2020-06-26 13:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-25 20:44 [PATCH] init: Align init_task to avoid conflict with MUTEX_FLAGS Stafford Horne
2020-06-26 11:12 ` Peter Zijlstra
2020-06-26 11:45   ` Stafford Horne
2020-06-26 13:11     ` Peter Zijlstra [this message]

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=20200626131145.GK4800@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=ebiederm@xmission.com \
    --cc=elver@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=paulmck@kernel.org \
    --cc=rppt@linux.ibm.com \
    --cc=samitolvanen@google.com \
    --cc=shorne@gmail.com \
    --cc=tglx@linutronix.de \
    /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