Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754295AbbDOM3I (ORCPT ); Wed, 15 Apr 2015 08:29:08 -0400 Received: from mail-wi0-f182.google.com ([209.85.212.182]:36109 "EHLO mail-wi0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752706AbbDOM3G (ORCPT ); Wed, 15 Apr 2015 08:29:06 -0400 Message-ID: <552E5992.2050404@linaro.org> Date: Wed, 15 Apr 2015 14:29:06 +0200 From: Daniel Lezcano User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Peter Zijlstra CC: rjw@rjwysocki.net, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, nicolas.pitre@linaro.org Subject: Re: [PATCH 1/3] cpuidle: Store the idle start time stamp References: <1429092024-20498-1-git-send-email-daniel.lezcano@linaro.org> <20150415102057.GR5029@twins.programming.kicks-ass.net> In-Reply-To: <20150415102057.GR5029@twins.programming.kicks-ass.net> 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: 929 Lines: 29 On 04/15/2015 12:20 PM, Peter Zijlstra wrote: > On Wed, Apr 15, 2015 at 12:00:22PM +0200, Daniel Lezcano wrote: >> + target_state->idle_stamp = ktime_to_us(ktime_get()); > > ktime_get_ns(); > Hmm, sounds like I missed we are dealing with different units (us / ns) in cpuidle / sched. Would it make sense to store the time into a ktime structure instead and use the relevant function depending on the place we are inspecting the value from ? -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/