Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752402AbdH2MrF (ORCPT ); Tue, 29 Aug 2017 08:47:05 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:33680 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751507AbdH2MrC (ORCPT ); Tue, 29 Aug 2017 08:47:02 -0400 Date: Tue, 29 Aug 2017 14:46:55 +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 Subject: Re: [RFC PATCH v2 7/7] sched/idle: update poll time when wakeup from idle Message-ID: <20170829124655.ann5cipoubl5lppn@hirez.programming.kicks-ass.net> References: <1504007201-12904-1-git-send-email-yang.zhang.wz@gmail.com> <1504007201-12904-8-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-8-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: 855 Lines: 19 On Tue, Aug 29, 2017 at 11:46:41AM +0000, Yang Zhang wrote: > In ttwu_do_wakeup, it will update avg_idle when wakeup from idle. Here > we just reuse this logic to update the poll time. It may be a little > late to update the poll in ttwu_do_wakeup, but the test result shows no > obvious performance gap compare with updating poll in irq handler. > > one problem is that idle_stamp only used when using CFS scheduler. But > it is ok since it is the default policy for scheduler and only consider > it should enough. > > Signed-off-by: Yang Zhang > Signed-off-by: Quan Xu Same broken SoB chain, and not a useful word on why you need to adjust this crap to begin with. What you want that poll duration to be related to is the cost of a VMEXIT/VMENTER cycle, not however long we happened to be idle. So no.