From: Ian Campbell Subject: Re: [PATCH] xen/arm: Don't save/restore context for idle VCPU Date: Wed, 9 Jul 2014 16:50:14 +0100 Message-ID: <1404921014.26217.0.camel@hastur.hellion.org.uk> References: <1404746955-20807-1-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1X4u8R-0004H7-C1 for xen-devel@lists.xenproject.org; Wed, 09 Jul 2014 15:50:19 +0000 In-Reply-To: <1404746955-20807-1-git-send-email-julien.grall@linaro.org> 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 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