From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932465AbcEROxK (ORCPT ); Wed, 18 May 2016 10:53:10 -0400 Received: from mx2.suse.de ([195.135.220.15]:46727 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932243AbcEROxI (ORCPT ); Wed, 18 May 2016 10:53:08 -0400 Subject: Re: [PATCH] xen: add steal_clock support on x86 To: Boris Ostrovsky , xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org References: <1463573758-11441-1-git-send-email-jgross@suse.com> <573C804F.6020708@oracle.com> Cc: sstabellini@kernel.org, david.vrabel@citrix.com From: Juergen Gross Message-ID: <573C81D1.9040309@suse.com> Date: Wed, 18 May 2016 16:53:05 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <573C804F.6020708@oracle.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18/05/16 16:46, Boris Ostrovsky wrote: > On 05/18/2016 08:15 AM, Juergen Gross wrote: >> } >> >> +void __init xen_time_setup_guest(void) >> +{ >> + pv_time_ops.steal_clock = xen_steal_clock; >> + >> + static_key_slow_inc(¶virt_steal_enabled); >> + /* >> + * We can't set paravirt_steal_rq_enabled as this would require the >> + * capability to read another cpu's runstate info. >> + */ >> +} > > 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? Juergen