Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751476AbdINIl4 (ORCPT ); Thu, 14 Sep 2017 04:41:56 -0400 Received: from mail-io0-f194.google.com ([209.85.223.194]:34724 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751206AbdINIly (ORCPT ); Thu, 14 Sep 2017 04:41:54 -0400 X-Google-Smtp-Source: AOwi7QB2UQXWlMJ4XbLeiW72q6VwneWwmmljj1H+XnigvLvZqaaCxzOBs0z11sX8pJzmLoxXeARLcg== Subject: Re: [RFC PATCH v2 3/7] sched/idle: Add poll before enter real idle path From: Quan Xu To: Peter Zijlstra , 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, Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Borislav Petkov , Kyle Huey , Andy Lutomirski , Len Brown References: <1504007201-12904-1-git-send-email-yang.zhang.wz@gmail.com> <1504007201-12904-4-git-send-email-yang.zhang.wz@gmail.com> <20170829124545.bonzgnoewlrphalm@hirez.programming.kicks-ass.net> Message-ID: <44ab9874-6271-9a36-efa1-942a9be3993a@gmail.com> Date: Thu, 14 Sep 2017 16:41:39 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1103 Lines: 36 on 2017/9/1 13:57, Quan Xu wrote: > on 2017/8/29 20:45, Peter Zijlstra wrote: > >> 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. >   Peter,  I can't follow 'Broken SoB chain'.. could you explain more > about it? >     Peter, Ping.. Quan >   -Quan > >>> 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? >