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

xen-devel

[Top] [All Lists]

Re: [Xen-devel] Re: [rfc] [patch] grant_entry.flags accessors

To: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [rfc] [patch] grant_entry.flags accessors
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: 2006年6月28日 07:43:07 +0100
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Hollis Blanchard <hollisb@xxxxxxxxxx>, xen-ppc-devel <xen-ppc-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: 2006年6月27日 23:49:45 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C140B0AB-770D-45D3-8261-7864CB7A729E@xxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1151097564.14454.44.camel@xxxxxxxxxxxxxxxxxxxxx> <46ab924009436680faa7cc0cb807c411@xxxxxxxxxxxx> <1151420814.31429.35.camel@xxxxxxxxxxxxxxxxxxxxx> <6bd19f34d11ffa609d6650b7937fb8b0@xxxxxxxxxxxx> <1151424690.31429.106.camel@xxxxxxxxxxxxxxxxxxxxx> <20a2a4524ce898b8fbd49cfd27c38b12@xxxxxxxxxxxx> <C140B0AB-770D-45D3-8261-7864CB7A729E@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On 27 Jun 2006, at 18:45, Jimi Xenidis wrote:
Hmm, the interesting part is that as far as bit-ops go in Linux x86 converged to longs rather then ppc converging to some the arbitrary bit method:
see:
include/asm-i386/bitops.h clear_bit 71 static inline void clear_bit(int nr, volatile unsigned long * addr) I've been told this was to solve a performance issue, but I am no expert.
Well there would be a performance impact for other architectures, no doubt. x86/64 never moved to longs for bitops.
, but anyway: How about add a ARCH_SUPPORTS_UNALIGNED_CMPXCHG and move special gnttab_cmpxchg() definition to gnttab.c, compilation dependent on that?
cmpxchg will take 1,2,4 byte, and pc will take to, however we need to abstract these anyway because the values are castes to a u32 and or'd in an little endian way.
Or rename the gnttab_cmpxchg to synch_cmpxchg_unaligned so at least the name is a bit more generic. It could then be used in other contexts.
The _main_ issue is not really alignof(p), beacuse the Xen code is careful about that, but sizeof(*p)which we need to calculate the bit position. Thats where this interface can get a little loosy for me.
Then pick a different name. :-) *_subword()? I won't put a gnttab_foo() in synch_bitops.h.
 -- Keir
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: [Xen-devel] How to do direct assignment of devices to VM in Xen. , Saripalli, Ramakrishna
Next by Date: Re: [Xen-devel] FW: Is it a correct place for VBD information? , Keir Fraser
Previous by Thread: Re: [Xen-devel] Re: [rfc] [patch] grant_entry.flags accessors , Jimi Xenidis
Next by Thread: Re: [Xen-devel] Re: [rfc] [patch] grant_entry.flags accessors , Hollis Blanchard
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /