From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754203AbcFQLSi (ORCPT ); Fri, 17 Jun 2016 07:18:38 -0400 Received: from mail-yw0-f173.google.com ([209.85.161.173]:33106 "EHLO mail-yw0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751301AbcFQLSg (ORCPT ); Fri, 17 Jun 2016 07:18:36 -0400 MIME-Version: 1.0 In-Reply-To: References: <1466154816-17900-1-git-send-email-zhaoyang.huang@spreadtrum.com> <1466154816-17900-2-git-send-email-zhaoyang.huang@spreadtrum.com> From: Zhaoyang Huang Date: Fri, 17 Jun 2016 19:18:30 +0800 Message-ID: Subject: Re: [RESEND PATCH v2 2/2] power/idle: enhance the precision of sleep_length To: Thomas Gleixner Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, mingo@redhat.com, peterz@infradead.org, =?UTF-8?B?Wmhhb3lhbmcgSHVhbmcgKOm7hOacnemYsyk=?= Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17 June 2016 at 17:27, Thomas Gleixner wrote: > On Fri, 17 Jun 2016, Zhaoyang Huang wrote: >> There should be a gap between tick_nohz_idle_enter and >> tick_nohz_get_sleep_length when idle, which will cause the >> sleep_length is not very precised. Change it in this patch. > > What kind of imprecision are we talking about? Seconds, nanoseconds or > lightyears? > > Your changelog lacks any form of useful information. > > Thanks, > > tglx > > sorry for the confusion. The imprecision can be caused by, for example, the callback function registered for CPU_PM_ENTER, which may consume a period of time within the 'idle' time. Besides, I also wonder why not calc the 'sleep_length' in the tick_nohz_get_sleep_length? This value is calculated at very beginning of the idle in current approach.