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>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] x86: optimize this_cpu()
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Tue, 13 Jul 2010 15:38:11 +0100
Cc:
Delivery-date: Tue, 13 Jul 2010 07:39:02 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C8623665.1A7F5%keir.fraser@xxxxxxxxxxxxx>
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: AcsikFreps+7Wb5vTJabEW2mJ3l2RAABvZ10AAANtQcAAF8Skw==
Thread-topic: [Xen-devel] [PATCH] x86: optimize this_cpu()
User-agent: Microsoft-Entourage/12.24.0.100205
On 13/07/2010 15:27, "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx> wrote:

> On 13/07/2010 15:26, "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx> wrote:
> 
>> That's just nasty. If we need the structure to be 16-byte aligned then we
>> should achieve it via __attribute__((__aligned__(16))). And if we add that
>> we may as well not ifdef it, I'm sure the up to 12 bytes padding on i386
>> won't cause stack overflow.
> 
> I should add: if you agree please re-do the patch. Also a code comment on
> what the alignment attribute is for would be a good idea of course.

Ah, hang on... We actually specifically want the structure to be not a
multiple of 16 don't we. :-) We need it to be an odd multiple of 8... Fair
enough en I guess. I'll add a code comment.

 -- Keir



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