From: Keir Fraser Subject: Re: [Xen-devel] [PATCH] don't use mlock() with Solaris tools Date: Mon, 23 Oct 2006 09:46:11 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-ppc-devel-bounces@lists.xensource.com Errors-To: xen-ppc-devel-bounces@lists.xensource.com To: Jimi Xenidis Cc: XenPPC-devel , xen-devel@lists.xensource.com, "Hollis R. Blanchard" , John Levon List-Id: xen-devel@lists.xenproject.org On 22/10/06 22:09, "Jimi Xenidis" wrote: > I cannot speak for Hollis (I think he may actually disagree with me) > but see this as an opportunity to design something better, or at > least have the debat (again). > What might be a better alternative an to actually have an allocate > call rather than an mlock call where the arches and OSes could to > what is best for them. > So what is done on x86 could be: > do { x = alloca(len); mlock (x, len); } while (0) > > but where solaris and other arches could do something more. It would change the API too, since memory buffers passed in by callers to libxc would also need to be allocated in a special way. Unless you would be prepared to perform the hypercall on a shadow buffer and then copy to the caller buffer, which I suppose would be a simpler API. John's patch is fine for now. -- Keir