WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] x86: optimize this_cpu()

To: Jan Beulich <JBeulich@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] x86: optimize this_cpu()
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Tue, 13 Jul 2010 16:03:48 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 13 Jul 2010 08:05:47 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4C3C9AFA020000780000B030@xxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acsim7g3jVc4UJcWShygZ6sh7zM8HwAAOBa4
Thread-topic: [Xen-devel] [PATCH] x86: optimize this_cpu()
User-agent: Microsoft-Entourage/12.24.0.100205
On 13/07/2010 15:57, "Jan Beulich" <JBeulich@xxxxxxxxxx> wrote:

>> Where does that come from?
> 
> From various assembly files, defining GET_CURRENT() or alike
> on their own. grep-ing for STACK_SIZE had helped me noticing
> the issue. Likewise GET_GUEST_REGS() implies that
> "guest_cpu_user_regs" is the first field of struct cpu_info (but
> this I would consider expected).

Hmm, I think I will do a cleanup patch, thanks!

On this theme, just look at how the code in arch/x86/acpi/wakeup_prot.S
(lines 162--167) does multiple hardcoded indirections to get at the current
domain_id. That is absolutely shocking!

 -- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel