Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp558161ybt; Fri, 26 Jun 2020 06:13:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygO8bMBbALQbwUwv5PFMpeage1L8oJ2iUFCDbSSmHZC+77rboBkBkTIwPLFUpw9lctJcsw X-Received: by 2002:a17:907:7294:: with SMTP id dt20mr2426399ejc.355.1593177194490; Fri, 26 Jun 2020 06:13:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593177194; cv=none; d=google.com; s=arc-20160816; b=mVWkPJJ4hA7HvzWM0oU4z401ArAuZgF5p7EOf54soWsYzodevsgGdAjZ9NiPA71i/E tAEMRxXyxHNQn1/2+zLm4XYdkuLW8DRkK9LU9XwiojFnaKHtB5/59B0Fd2yhgOkVXTV/ kbYy+uKhe/ft48vAElj3ZX6wX/GD599v3Tag824Cz08gikblS4RqKX13Xpt4dddOe90b LoWUjWHJ9n9og/eYRucmbR3yysbN+d6An8KWQCqQnghZlG/UQfX55gUyx3yy/tvii5H/ r82tkwPpDYmLLyTmlF8qDv2RJmMh3AMFCme6vEkHhCYDiOcd9ZZGIW6rlcU1f8q4XajO cTsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=HR+4c9AAqoff1jf49kNj5qLtp8bMDAoCQxcnvw4UhvI=; b=LcLkgtAiENdVSpqdrnk3/RTE9/5n4G2HTq6GNGx40rV3TwC+6ckuJ4E7Ha48MXwswL bILx1cQd5CnZ/E8/NrKCYRF8WcfuZ/lpL/OxgTkKD+inUVx2COD61U5HVy3MVqQ/SUBw aDyRhRSqeMjIA8WZH224zS7A2Nf6Cvf2bP90vxluwhyDMNWIuAUEoq5otAWzpzjPACb3 I79wmu0rURyW2mbyvseqnbl4KuWCk9CQWGR0zw2tPnVyo2RigEjCKZ1N+OBv0vwRCsLG rrr4nfdstRHNSyEKlagfaEHtDwhXaVGVfZMiuzs7CzwGv7sR/OZRYF4bMOO3XGOdrWS0 oFuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=s+hzMbai; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h5si10025226ejy.226.2020.06.26.06.12.49; Fri, 26 Jun 2020 06:13:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=s+hzMbai; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726959AbgFZNMU (ORCPT + 99 others); Fri, 26 Jun 2020 09:12:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725900AbgFZNMT (ORCPT ); Fri, 26 Jun 2020 09:12:19 -0400 Received: from casper.infradead.org (unknown [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36014C08C5DB for ; Fri, 26 Jun 2020 06:12:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=HR+4c9AAqoff1jf49kNj5qLtp8bMDAoCQxcnvw4UhvI=; b=s+hzMbaiLjuMK3/qoVhh685IoS /s6/IjdnBub73abmHqD7K1GxMc/K2wCXUNKGpaNp9LVG7ozOTWjIMla0LfBwKXUKYc9S5iqwdEDrk qHZezPF+8nOpr6iB5UGAbUfU7SrTUrq0HN7E82YsaNBh/6O3lnSbcWowtrZzMu+NOYhyZGg06hIEr MONdk8/MeMeltSNBmouO16g1o9vraT09qpRo7dyPjeTL2vHK4FhQMO/9jTiiIwHB+xnVAOWv7T7il ZOcodDnACzYd3aWowVikove9VfKYQihBKOlVqMOORImZqgzCr1V75/Luh4HlpxVxPT4fLFtp7uosd IpRBz+AQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1joo8y-0005o9-Ew; Fri, 26 Jun 2020 13:11:49 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id B54DF3003E3; Fri, 26 Jun 2020 15:11:45 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id A828329CC71D8; Fri, 26 Jun 2020 15:11:45 +0200 (CEST) Date: Fri, 26 Jun 2020 15:11:45 +0200 From: Peter Zijlstra To: Stafford Horne Cc: LKML , "Paul E. McKenney" , Marco Elver , "Eric W. Biederman" , Ingo Molnar , Thomas Gleixner , Mike Rapoport , Sami Tolvanen Subject: Re: [PATCH] init: Align init_task to avoid conflict with MUTEX_FLAGS Message-ID: <20200626131145.GK4800@hirez.programming.kicks-ass.net> References: <20200625204410.3168791-1-shorne@gmail.com> <20200626111208.GD4817@hirez.programming.kicks-ass.net> <20200626114522.GI1401039@lianli.shorne-pla.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200626114522.GI1401039@lianli.shorne-pla.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) > 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