Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758938AbcJ1Hne (ORCPT ); Fri, 28 Oct 2016 03:43:34 -0400 Received: from merlin.infradead.org ([205.233.59.134]:45886 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751913AbcJ1Hnd (ORCPT ); Fri, 28 Oct 2016 03:43:33 -0400 Date: Fri, 28 Oct 2016 09:43:29 +0200 From: Peter Zijlstra To: Vikram Mulukutla 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 Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1477638642-17428-3-git-send-email-markivx@codeaurora.org> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 437 Lines: 17 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.