Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760055AbcCDUrd (ORCPT ); Fri, 4 Mar 2016 15:47:33 -0500 Received: from mail.windriver.com ([147.11.1.11]:41459 "EHLO mail.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757023AbcCDUrc (ORCPT ); Fri, 4 Mar 2016 15:47:32 -0500 Message-ID: <56D9F45C.5050602@windriver.com> Date: Fri, 4 Mar 2016 14:47:24 -0600 From: Chris Friesen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: lkml , Frederic Weisbecker Subject: Re: question about logic of steal_account_process_tick() ? References: <56D9E72D.5060308@windriver.com> In-Reply-To: <56D9E72D.5060308@windriver.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [172.25.39.6] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 854 Lines: 19 On 03/04/2016 01:51 PM, Chris Friesen wrote: > The thing is, steal_account_process_tick() returns units of cputime, which I > think is nanoseconds on x86_64. So if we have a tiny amount of stolen time it > seems like that will prevent a whole tick from being accounted into > user/system/idle. > > I feel like I must be missing something here, can someone tell me what it is? Looking at commit dee08a72 (from 2014) it seems like the units of the return value of steal_account_process_tick() changed from ticks to cputime_t. I don't see an equivalent change in the logic in account_process_tick(), which seems to assume that a nonzero return value in steal_account_process_tick() means a whole tick has been stolen. Was there a change to make paravirt_steal_clock() increment in ticks? If not it seems like there's a unit mismatch here. Chris