Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752174AbdH2MqI (ORCPT ); Tue, 29 Aug 2017 08:46:08 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:40646 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751976AbdH2MqF (ORCPT ); Tue, 29 Aug 2017 08:46:05 -0400 Date: Tue, 29 Aug 2017 14:45:45 +0200 From: Peter Zijlstra To: Yang Zhang Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, wanpeng.li@hotmail.com, mst@redhat.com, pbonzini@redhat.com, tglx@linutronix.de, rkrcmar@redhat.com, dmatlack@google.com, agraf@suse.de, linux-doc@vger.kernel.org, Quan Xu , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Borislav Petkov , Kyle Huey , Andy Lutomirski , Len Brown Subject: Re: [RFC PATCH v2 3/7] sched/idle: Add poll before enter real idle path Message-ID: <20170829124545.bonzgnoewlrphalm@hirez.programming.kicks-ass.net> References: <1504007201-12904-1-git-send-email-yang.zhang.wz@gmail.com> <1504007201-12904-4-git-send-email-yang.zhang.wz@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1504007201-12904-4-git-send-email-yang.zhang.wz@gmail.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 842 Lines: 23 On Tue, Aug 29, 2017 at 11:46:37AM +0000, Yang Zhang wrote: > Add poll in do_idle. For UP VM, if there are running task, it will not > goes into idle path, so we only enable poll in SMP VM. > > Signed-off-by: Yang Zhang > Signed-off-by: Quan Xu Broken SoB chain. > diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c > index 6c23e30..b374744 100644 > --- a/kernel/sched/idle.c > +++ b/kernel/sched/idle.c > @@ -74,6 +74,7 @@ static noinline int __cpuidle cpu_idle_poll(void) > } > > /* Weak implementations for optional arch specific functions */ > +void __weak arch_cpu_idle_poll(void) { } > void __weak arch_cpu_idle_prepare(void) { } > void __weak arch_cpu_idle_enter(void) { } And not a word on why we need a new arch hook. What's wrong with arch_cpu_idle_enter() for instance?