From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Stultz Subject: Re: [RFC PATCH] power: Add option to log time spent in suspend Date: Thu, 02 May 2013 11:58:22 -0700 Message-ID: <5182B74E.8060909@linaro.org> References: <1367360914-23389-1-git-send-email-zoran.markovic@linaro.org> <1367360914-23389-2-git-send-email-zoran.markovic@linaro.org> <20130501002929.GA20042@amd.pavel.ucw.cz> <20130502122747.GA22618@amd.pavel.ucw.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mail-pd0-f170.google.com ([209.85.192.170]:59632 "EHLO mail-pd0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932368Ab3EBS6Z (ORCPT ); Thu, 2 May 2013 14:58:25 -0400 Received: by mail-pd0-f170.google.com with SMTP id 10so510536pdi.29 for ; Thu, 02 May 2013 11:58:25 -0700 (PDT) In-Reply-To: Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: Colin Cross Cc: Pavel Machek , Zoran Markovic , lkml , Linux PM list , Android Kernel Team , Todd Poynor , San Mehat , Benoit Goby , "Rafael J. Wysocki" , Len Brown On 05/02/2013 11:29 AM, Colin Cross wrote: > On Thu, May 2, 2013 at 5:27 AM, Pavel Machek wrote: >> >>> dmesg is not the solution, it's not a stable api, it would require >>> constant parsing to make sure you didn't miss data before it fell out >>> of the ringbuffer, and sched_clock often does not (and should not) >>> tick during suspend, so printk times don't show the time spent >>> suspended. >> If timing info printed is invalid, that should be fixed. > It's not invalid, its just not measuring the time that is useful here. > printk is measuring something similar to (but not exactly the same > as) CLOCK_MONOTONIC, but this is measuring something similar to > CLOCK_BOOTTIME. One thing I'm curious about with this patch, since we measure and keep track of suspend time in the timekeeping core, there may be enough justification to adding this sort of debugging info the timekeeping core itself. Although what is being tracked with this driver isn't just total time in suspend, but looks like more of a logarithmic histogram of suspend times. Is there any context you can provide as to why that particular format was chosen (which would could be added to help improve the commit message)? thanks -john