From: Ian Campbell Subject: Re: [PATCH] xen/arm: Don't save/restore context for idle VCPU Date: Thu, 10 Jul 2014 11:32:59 +0100 Message-ID: <1404988379.32404.27.camel@hastur.hellion.org.uk> References: <1404746955-20807-1-git-send-email-julien.grall@linaro.org> <1404921014.26217.0.camel@hastur.hellion.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1X5Bey-0003Z7-39 for xen-devel@lists.xenproject.org; Thu, 10 Jul 2014 10:33:04 +0000 In-Reply-To: <1404921014.26217.0.camel@hastur.hellion.org.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: xen-devel@lists.xenproject.org, tim@xen.org, stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org On Wed, 2014-07-09 at 16:50 +0100, Ian Campbell wrote: > On Mon, 2014-07-07 at 16:29 +0100, Julien Grall wrote: > > When an idle VCPU is running, Xen will never exit the hypervisor mode. > > Futhermore, some part of the VCPU/domain initialization is already skipped for > > them to avoid memory consumption. > > > > Actually each save/restore functions are checking themself if the vcpu is > > an idle one or not. We can safely skipped the context switch in one place > > and gain a bit of time when we {,un}schedule idle VCPU. This is because > > the saving part will take care of disabling anything related to guest (such > > as GICv). > > > > Also replace every check of and idle VCPU in save/restore functions by an > > ASSERT, to know if someone is calling them with an idle VCPU in argument. > > > > Signed-off-by: Julien Grall > > Acked-by: Ian Campbell Applied.