From: Daniel Veillard <veillard@redhat.com>
To: John Levon <levon@movementarian.org>
Cc: xen-devel@lists.xensource.com
Subject: Re: [PATCH] don't use mlock() with Solaris tools
Date: Fri, 20 Oct 2006 18:35:28 -0400 [thread overview]
Message-ID: <20061020223527.GC28613@redhat.com> (raw)
In-Reply-To: <20061020034247.GB4480@totally.trollied.org>
On Fri, Oct 20, 2006 at 04:42:47AM +0100, John Levon wrote:
> on solaris: mlock requires a page aligned address and mlock doesn't ensure the pages won't minor page fault; so don't use it on solaris.
[...]
> -/* NB: arr must be mlock'ed */
> +int lock_pages(void *addr, size_t len)
> +{
> + int e = 0;
> +#ifndef __sun__
> + e = mlock(addr, len);
> +#endif
> + return (e);
> +}
> +
> +void unlock_pages(void *addr, size_t len)
> +{
> +#ifndef __sun__
> + safe_munlock(addr, len);
> +#endif
> +}
> +
So on Solaris you don't pin down the memory used for hypercall parameters
and results at all ? Is there really no risk associated with this strategy ?
surprised,
Daniel
--
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard | virtualization library http://libvirt.org/
veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
next prev parent reply other threads:[~2006-10-20 22:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-20 3:42 [PATCH] don't use mlock() with Solaris tools John Levon
2006-10-20 22:35 ` Daniel Veillard [this message]
2006-10-20 23:11 ` Mark Johnson
2006-10-22 18:02 ` John Levon
2006-10-22 18:16 ` Keir Fraser
2006-10-22 21:09 ` Jimi Xenidis
2006-10-23 8:38 ` [Xen-devel] " John Levon
2006-10-23 8:46 ` Keir Fraser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061020223527.GC28613@redhat.com \
--to=veillard@redhat.com \
--cc=levon@movementarian.org \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.