Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758844AbcJ1H6S (ORCPT ); Fri, 28 Oct 2016 03:58:18 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:43750 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755920AbcJ1H6R (ORCPT ); Fri, 28 Oct 2016 03:58:17 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 28 Oct 2016 00:58:16 -0700 From: Vikram Mulukutla To: Peter Zijlstra Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Srivatsa Vaddagiri , Steve Muckle , Olav Haugan , Syed Rameez Mustafa , Joonwoo Park , Pavankumar Kondeti , Saravana Kannan , Bryan Huntsman , Juri Lelli , Morten Rasmussen , Dietmar Eggemann , Chris Redpath , Robin Randhawa , Patrick Bellasi , Todd Kjos , Srinath Sridharan , Andres Oportus , Leo Yan , Vincent Guittot , Vikram Mulukutla Subject: Re: [RFC PATCH 2/3] sched: Introduce Window-Assisted CPU utilization Tracking In-Reply-To: <20161028074329.GS3102@twins.programming.kicks-ass.net> References: <1477638642-17428-1-git-send-email-markivx@codeaurora.org> <1477638642-17428-3-git-send-email-markivx@codeaurora.org> <20161028074329.GS3102@twins.programming.kicks-ass.net> Message-ID: User-Agent: Roundcube Webmail/1.2.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 672 Lines: 24 On 2016-10-28 00:43, Peter Zijlstra wrote: > On Fri, Oct 28, 2016 at 12:10:41AM -0700, Vikram Mulukutla wrote: >> +u64 walt_ktime_clock(void) >> +{ >> + if (unlikely(walt_ktime_suspended)) >> + return ktime_to_ns(ktime_last); >> + return ktime_get_ns(); >> +} > >> +static int walt_suspend(void) >> +{ >> + ktime_last = ktime_get(); >> + walt_ktime_suspended = true; >> + return 0; >> +} > > No, ktime_get() will not be used in the scheduler. Imagine the joy if > that thing ends up being the HPET. Agreed, this is an artifact from the full implementation that feeds into the interactive governor, and thus both needed to use the same time source. It shall go away.