Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2276745imu; Tue, 6 Nov 2018 11:52:22 -0800 (PST) X-Google-Smtp-Source: AJdET5d9h66EqYGWTCqyMiYrvfTxzC2Alf9Ov44PSPVLtMFxiCK4yKyYTcUMTicfv2QtMea5nT4F X-Received: by 2002:a62:83c2:: with SMTP id h185-v6mr27445032pfe.187.1541533942518; Tue, 06 Nov 2018 11:52:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541533942; cv=none; d=google.com; s=arc-20160816; b=vgMXz9uAwBfyX2Iwigvy8bpj/Yjsf66x8kekT0abzZsIp19JjYmohUMmLvA9s3Ezj/ 73mjdERIxHqDgNpCI7RtYEA1jADS0NlJPVT4S327UUrGnSuJc/mqpMI5MI5jD9av8NZI 3b7fAlzfeL+U1vEGWytTvjTTAnbxlriV14H2EKxdxr5+20XSzj/4euT3z0Vy0QBIVqr2 PXsHaLJfNDpaV0KxavO48x4H01ayn0lV1qXOphZ0B7Z40MYsT9RhhAilgg34lg6lH65w ZqMJLG2f0r5CQRDQYbKoWwRoyoWypJowOEjPJD1wBZTA32hTWBcuAc8wNguz6f9jNXuB 4ufg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Q57uU5u68BspbuBOA5NjT88EWpisTycpj6GL6HXmAcE=; b=LGNA1vJvKOwt/FTwr8B5QAqCTcHrKg56x9MEVsIrYwaS4AJtdSKQhZwfwBE6QMtAsC 0IzS79oKngHP+H4poG9LVlPzTonqr2Ud35ldDxtVG7JkIQRArcELL59DxZZ+rr6akFNj IIXRbS+RuUQmWvR+lxI6HQDsOU2XCzleKWfnjVQfybVg8Ib7LPsUiQcihgLf7eRBrODH 9WeTXCGDh3vAU4CycPBfmBJ2P9JnoYMQIp7R01LSaG8vekEt+Ic+Lrvt9jpACgzTiLXE TWihVjckKEH/AUgANZMMNztZg4/jY8m0P0KoqtOzj6714aQOz18lkd9xIiBnu7jtJbLg l8+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b="Zf/+S/Sc"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g24-v6si47708924pgh.188.2018.11.06.11.52.05; Tue, 06 Nov 2018 11:52:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b="Zf/+S/Sc"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726611AbeKGFS2 (ORCPT + 99 others); Wed, 7 Nov 2018 00:18:28 -0500 Received: from merlin.infradead.org ([205.233.59.134]:42880 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725975AbeKGFS2 (ORCPT ); Wed, 7 Nov 2018 00:18:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Q57uU5u68BspbuBOA5NjT88EWpisTycpj6GL6HXmAcE=; b=Zf/+S/Sc33Qg5t/hangXG71ld BXXHAT7DLJGgHo8WPrChRDCcwokhue1xGN9j7nRcZwWURMdiu0+0qW1ywAYN9NF48uZFGfEFX33HQ lC4XvqFIItLdGqoZ8gIVSCjrgk6ci+CudCCzc7rT41MES8T5fZr7zVIHxMsl40+Bs+sHdkkZ5NOqL usjT2tHSt9sVR8oeO37XAgQlBb02FVxD2JtQv2z+yTH/oopM38kDVJCfEJSYqxoE1yA9U3W8UNfI0 8y4rXcehmL3gvdz3XIQOZ/MxIJpPPkk0lgZ7X63/3+WAgHmrPd+xFTHBGS9HCkFlUYXjHjgOoU5Pq 8M5BcSzAg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gK7No-0001oi-OJ; Tue, 06 Nov 2018 19:51:29 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 544962029F883; Tue, 6 Nov 2018 20:51:27 +0100 (CET) Date: Tue, 6 Nov 2018 20:51:27 +0100 From: Peter Zijlstra To: "Rafael J. Wysocki" Cc: "Rafael J. Wysocki" , Linux PM , Giovanni Gherdovich , Doug Smythies , Srinivas Pandruvada , Linux Kernel Mailing List , Frederic Weisbecker , Mel Gorman , Daniel Lezcano Subject: Re: [RFC/RFT][PATCH v3] cpuidle: New timer events oriented governor for tickless systems Message-ID: <20181106195127.GD9781@hirez.programming.kicks-ass.net> References: <1556808.yKVbhZSazi@aspire.rjw.lan> <20181106170442.GC9781@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 06, 2018 at 07:19:24PM +0100, Rafael J. Wysocki wrote: > On Tue, Nov 6, 2018 at 6:04 PM Peter Zijlstra wrote: > > Instead of this detector; why haven't you used the code from > > kernel/irq/timings.c ? > > Because it doesn't help much AFAICS. > > Wakeups need not be interrupts in particular You're alluding to the MWAIT wakeup through the MONITOR address ? > and interrupt patterns that show up when the CPU is busy may not be > relevant for when it is idle. I think that is not always true; consider things like the periodic interrupt from frame rendering or audio; if there is nothing more going on in the system than say playing your favourite tune, it gets the 'need more data soon' interrupt from the audio card, wakes up, does a little mp3/flac/ogg/whatever decode to fill up the buffer and goes back to sleep. Same for video playback I assume, the vsync interrupt for buffer flips is fairly predictable. The interrupt predictor we have in kernel/irq/timings.c should be very accurate in predicting those interrupts.