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] Cleanup rmb()/wmb() usage

To: Anthony Liguori <aliguori@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Cleanup rmb()/wmb() usage
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Wed, 23 Feb 2005 07:18:14 +0000
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 23 Feb 2005 07:19:33 +0000
Envelope-to: xen+James.Bulpin@xxxxxxxxxxxx
In-reply-to: <421BFACD.7090606@xxxxxxxxxx>
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
References: <421BFACD.7090606@xxxxxxxxxx>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx

On 23 Feb 2005, at 03:38, Anthony Liguori wrote:

This is a pretty simple patch to use the read/write barriers defined in asm/system.h instead of using hardcoded versions in various places throughout Xen.

I've checked and using asm/system.h generates the same code on my system. I also tested xcs and it seems to work fine. I haven't tested blktap but again, it's generating the same code.

asm/system.h is a private kernel header so should not be directly included from user space. Inlcuding it may not work for all versions of Linux, or for other architectures.

We should probably merge the barrier defs we have scattered in the tools directory into one low-level architectural header that we include everywhere, and extend for x86/64, ia64, and so on.

Right now, wmb() is defined as a NOP on any 386 architecture. Some Intel clones require a non-NOP wmb(). Using asm/system.h ensures we do the right thing.

Only Centaur clones that have been set up by the kernel to do write combining. Xen does not ever enable write-combining on normal RAM and so a barrier is never required.

 -- Keir



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

<Prev in Thread] Current Thread [Next in Thread>