From: Keir Fraser Subject: Re: [patch] make evtchn_upcall_pending arch-specific type Date: Sun, 2 Apr 2006 09:27:29 +0100 Message-ID: <793a258bb84fdc164677f999096fbcee@cl.cam.ac.uk> References: <200603301313.44384.hollisb@us.ibm.com> <5764fe373f0ae77a75e8a9a8e2826900@cl.cam.ac.uk> <5BD25DCF-992A-4C95-B349-622F213EA4F4@watson.ibm.com> <493993A5-D07B-4F95-883C-00B89B2D831C@watson.ibm.com> Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <493993A5-D07B-4F95-883C-00B89B2D831C@watson.ibm.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jimi Xenidis Cc: xen-devel@lists.xensource.com, Hollis Blanchard , xen-ppc-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 1 Apr 2006, at 20:45, Jimi Xenidis wrote: >>> unsigned long evtchn_upcall_bits; >> >> We'd have to group more than just the mask and pending flags into >> that long on x86 as otherwise we change the size of a public >> structure. > > No size change, those two elements are padded to a long to accommodate > the size and alignment of evtchn_pending_sel; so the size remains the > same. Well that is true. I'd still like to see how big the patch would be to hide accesses of the pending flag behind a macro, and how clean that would end up being. There maybe also be the issue of non-atomic updates of the mask flag, but that mostly only happens in xenlinux. IA64 and x86 can update distinct bytes separately and atomically, but I'm not sure if powerpc guarantees writes are atomic at byte granularity? That flag gets touched quite a lot when running xenlinux, so we wouldn't want to make the accesses anything other than ordinary writes on x86 and ia64. That's one of the benefits for us of currently defining the mask flag in a separate uint8_t. -- Keir