From: Keir Fraser <keir.fraser@eu.citrix.com>
To: Dan Magenheimer <dan.magenheimer@oracle.com>,
"Xen-Devel (E-mail)" <xen-devel@lists.xensource.com>
Cc: Diwaker Gupta <dgupta@cs.ucsd.edu>,
nitingupta910@gmail.com, kurt.hackel@oracle.com
Subject: Re: [RFC] Replacing Xen's xmalloc engine and(?) API
Date: Sun, 12 Oct 2008 11:25:34 +0100 [thread overview]
Message-ID: <C5178F2E.1E189%keir.fraser@eu.citrix.com> (raw)
In-Reply-To: <C5177EFB.1E12A%keir.fraser@eu.citrix.com>
On 12/10/08 10:16, "Keir Fraser" <keir.fraser@eu.citrix.com> wrote:
> On 11/10/08 22:44, "Dan Magenheimer" <dan.magenheimer@oracle.com> wrote:
>
>> As a result, I'd like to propose a change to the xmalloc interface
>> to make this issue more explicit: I'd like to change xmalloc/xfree
>> to FAIL on allocation sizes greater than PAGE_SIZE - DELTA, where
>> DELTA is a defined constant. Callers that require an allocation
>> larger than that MUST use the page_alloc (and corresponding
>> page_free) interfaces. In other words, for any dynamic allocation
>> code that needs a dynamically computed size that might exceed a
>> page, the test must be done on the caller-side... and the caller
>> is responsible for remembering whether the subpage allocator or
>> the page-plus allocator was used, and free'ing with the matching
>> subpage-free or page-plus-free routine. While I'd never propose
>> this unforgiving API for user-land code, I think it isn't unreasonable
>> in a hypervisor.
>
> This sounds crazy to me. xmalloc() should work like malloc().
For example, why not take Linux's SLUB allocator? The fact it's tried and
tested in a real-world environment not unlike our own is a big advantage to
my mind.
-- Keir
next prev parent reply other threads:[~2008-10-12 10:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-11 21:44 [RFC] Replacing Xen's xmalloc engine and(?) API Dan Magenheimer
2008-10-11 22:12 ` Stefan de Konink
2008-10-11 22:59 ` Dan Magenheimer
2008-10-12 9:16 ` Keir Fraser
2008-10-12 10:25 ` Keir Fraser [this message]
2008-10-12 16:28 ` Dan Magenheimer
2008-10-12 16:47 ` Keir Fraser
2008-10-12 17:31 ` Dan Magenheimer
2008-10-12 17:42 ` Keir Fraser
[not found] <4cefeab80810121044j44687af3s78574b41c7a9ab04@mail.gmail.com>
2008-10-12 17:55 ` Keir Fraser
2008-10-12 18:03 ` Dan Magenheimer
2008-10-12 18:34 ` 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=C5178F2E.1E189%keir.fraser@eu.citrix.com \
--to=keir.fraser@eu.citrix.com \
--cc=dan.magenheimer@oracle.com \
--cc=dgupta@cs.ucsd.edu \
--cc=kurt.hackel@oracle.com \
--cc=nitingupta910@gmail.com \
--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.