Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp215379pxu; Wed, 25 Nov 2020 00:52:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJyIK9LOgtqI/RCtF+b8GNG/BVsb0o5hiKrXogyNHQuAINMg561MNCADobzYN9PMs7CZYDqF X-Received: by 2002:a50:9344:: with SMTP id n4mr573752eda.85.1606294378836; Wed, 25 Nov 2020 00:52:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606294378; cv=none; d=google.com; s=arc-20160816; b=GRaoHQDP5zH0mAtMB6U/NNxPDbyY+JRZoFxjPKF9ww1oMhnoTQCAxVFlT2FXSSQwkH hRsckYzXFUvDHNfFqF8gAA69k3SO87G6lVwfqHMiehYXA1FqUJMiHUQ9pB7qHAmgl8ZX 7rqVZgftnaRRcYQBzF91vPtujmbI2dFKoBWlE+Egrq1fl5YsstNV2xhQTwWHw2L5pe4U Ks7VHU0xjUtvG5HUgCn6IH3EwIb1h8GKyvIM1cLg/wsPKXTTCoOGgqmF4zzCrvVjaS5T FYHLpJkTkvGGmt9O4s9EaOsrt4snqLRyf9rtWCE9RiYgMHtwicYnudQqmsv/ZxOrJoxH N6gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=03txFcJNBslvd+BNPT41sjaiOCJak/ukhem/Aa3k44s=; b=fwTdBYfUoefNuGTP1YviQvZdOhyqkbWNtfum7rL1Z+bbcpTX40db08F0rX/gYl4ncn jdwKyblhQfMk3Ii2VPAP8KEH/dwvzCmcdlkHfSJq/DJ1DLCNZEMVYKrrDIt56rp1PIRL SaBs+ndD6pOl2LZ095o5QMwCr3WFWMrBGJe4FVvKDYntp78EY96r4KCarAsLCZggVxTb 82Fy2Cw2uv/t5neHCJvmpuaSgtCAaVyosZco1HRz/755K34aYQpvKmmpMyEKu+ascfBx RvkSs2XTfkq0VQCiFLoyVgWTC7a+qqCXjD4pZVrmB4Lk8XPJ3AFIAkSi3lEsZS5KmN+P x40g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=NVSFu2c4; 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 cx24si806993edb.419.2020.11.25.00.52.35; Wed, 25 Nov 2020 00:52:58 -0800 (PST) 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=pass header.i=@infradead.org header.s=casper.20170209 header.b=NVSFu2c4; 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 S1727123AbgKYIuO (ORCPT + 99 others); Wed, 25 Nov 2020 03:50:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726114AbgKYIuN (ORCPT ); Wed, 25 Nov 2020 03:50:13 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3839CC0613D4 for ; Wed, 25 Nov 2020 00:50:13 -0800 (PST) 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=03txFcJNBslvd+BNPT41sjaiOCJak/ukhem/Aa3k44s=; b=NVSFu2c4nKDCwGDr4/NGC2ACGz L84kIAdaNGXUW5AEvKiDHUZ8cBNV3oMk6zQvlJyJQiKXlq+f42+4yqSyVEZ2evwXwxrVImkU0tK4H NF7F6Q/ahTZ45tS61OXfjp9/ppLJk/RpHi2HNvWRr+cJ1qOAzPcJWZ3ob0MKXUn5gQQZU44YNZ8mI T8R+0pidXXkcCXdEsYszNzUbtGxhGkesgjDny5dWdEYI5SxDGQTYnIYWNCxG1UWdmXs3DqW7q11nA HTeRgstxZ7J5njStFp5MBt4XNMaf/veRc4Q0r+cIbE6Ui8DxQU8v7hbjRkCnhwhq1lxDwALUSA/dB vPbPPbqA==; 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 1khqUA-0006h9-LH; Wed, 25 Nov 2020 08:49:14 +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 DA5A0301124; Wed, 25 Nov 2020 09:49:08 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id C4DE2209BAB21; Wed, 25 Nov 2020 09:49:08 +0100 (CET) Date: Wed, 25 Nov 2020 09:49:08 +0100 From: Peter Zijlstra To: Joel Fernandes Cc: Nishanth Aravamudan , Julien Desfossez , Tim Chen , Vineeth Pillai , Aaron Lu , Aubrey Li , tglx@linutronix.de, linux-kernel@vger.kernel.org, mingo@kernel.org, torvalds@linux-foundation.org, fweisbec@gmail.com, keescook@chromium.org, kerrnel@google.com, Phil Auld , Valentin Schneider , Mel Gorman , Pawan Gupta , Paolo Bonzini , vineeth@bitbyteword.org, Chen Yu , Christian Brauner , Agata Gruza , Antonio Gomez Iglesias , graf@amazon.com, konrad.wilk@oracle.com, dfaggioli@suse.com, pjt@google.com, rostedt@goodmis.org, derkling@google.com, benbjiang@tencent.com, Alexandre Chartre , James.Bottomley@hansenpartnership.com, OWeisse@umich.edu, Dhaval Giani , Junaid Shahid , jsbarnes@google.com, chris.hyser@oracle.com, Ben Segall , Josh Don , Hao Luo , Tom Lendacky , Aubrey Li , "Paul E. McKenney" , Tim Chen Subject: Re: [PATCH -tip 19/32] entry/idle: Enter and exit kernel protection during idle entry and exit Message-ID: <20201125084908.GO2414@hirez.programming.kicks-ass.net> References: <20201117232003.3580179-1-joel@joelfernandes.org> <20201117232003.3580179-20-joel@joelfernandes.org> <20201124161335.GB3021@hirez.programming.kicks-ass.net> <20201124180343.GF1021337@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201124180343.GF1021337@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 24, 2020 at 01:03:43PM -0500, Joel Fernandes wrote: > On Tue, Nov 24, 2020 at 05:13:35PM +0100, Peter Zijlstra wrote: > > On Tue, Nov 17, 2020 at 06:19:49PM -0500, Joel Fernandes (Google) wrote: > > > +static inline void generic_idle_enter(void) > > > +static inline void generic_idle_exit(void) > > That naming is terrible.. > > Yeah sorry :-\. The naming I chose was to be aligned with the > CONFIG_GENERIC_ENTRY naming. I am open to ideas on that. entry_idle_{enter,exit}() ? > > I'm confused.. arch_cpu_idle_{enter,exit}() weren't conveniently placed > > for you? > > The way this patch series works, it does not depend on arch code as much as > possible. Since there are other arch that may need this patchset such as ARM, > it may be better to keep it in the generic entry code. Thoughts? I didn't necessarily mean using those hooks, even placing your new hooks right next to them would've covered the exact same code with less lines modified.