From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753676AbcERRUj (ORCPT ); Wed, 18 May 2016 13:20:39 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:47032 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753315AbcERRUh convert rfc822-to-8bit (ORCPT ); Wed, 18 May 2016 13:20:37 -0400 Subject: Re: [Xen-devel] [PATCH] xen: add steal_clock support on x86 To: Dario Faggioli , Juergen Gross , xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org References: <1463573758-11441-1-git-send-email-jgross@suse.com> <573C804F.6020708@oracle.com> <573C81D1.9040309@suse.com> <1463587813.5851.35.camel@citrix.com> Cc: sstabellini@kernel.org, david.vrabel@citrix.com, Tony S From: Boris Ostrovsky Message-ID: <573CA455.8060002@oracle.com> Date: Wed, 18 May 2016 13:20:21 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <1463587813.5851.35.camel@citrix.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Source-IP: userv0022.oracle.com [156.151.31.74] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/18/2016 12:10 PM, Dario Faggioli wrote: > On Wed, 2016-05-18 at 16:53 +0200, Juergen Gross wrote: >> On 18/05/16 16:46, Boris Ostrovsky wrote: >>> >>> Won't we be accounting for stolen cycles twice now --- once from >>> steal_account_process_tick()->steal_clock() and second time from >>> do_stolen_accounting()? >> Uuh, yes. >> >> I guess I should rip do_stolen_accounting() out, too? It is a >> Xen-specific hack, so I guess nobody will cry. Maybe it would be a >> good idea to select CONFIG_PARAVIRT_TIME_ACCOUNTING for XEN then? >> > So, config options aside, if I understand this correctly, it looks like > we were actually already doing steal time accounting, although in a > non-standard way. > > And yet, people seem to have issues relating to lack of (proper?) steal > time accounting (Cc-ing Tony). > > I guess this means that, either: > - the issue being reported is actually not caused by the lack of > steal time accounting, > - our current (Xen specific) steal time accounting solution is flawed, > - the issue is caused by the lack of the bit of steal time accounting > that we do not support yet, I believe it's this one. Tony narrowed the problem down to update_curr() where vruntime is calculated, based on runqueue's clock_task value. That value is computed in update_rq_clock_task(), which needs paravirt_steal_rq_enabled. -boris > - other ideas? Tony? > > Dario