public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Jes Sorensen <jes@wildopensource.com>
To: davidm@hpl.hp.com
Cc: Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org
Subject: Re: [patch - 2.6.11-rc5-mm1] genalloc - general purpose allocator
Date: Thu, 03 Mar 2005 08:21:56 +0000	[thread overview]
Message-ID: <yq03bvdf8bf.fsf@jaguar.mkp.net> (raw)
In-Reply-To: <16934.5385.841758.628631@napali.hpl.hp.com>

>>>>> "David" = David Mosberger <davidm@napali.hpl.hp.com> writes:

David> At the risk of asking the obvious: what's preventing genalloc
David> to be implemented in terms of mempool?

David,

Taking another look at mempool, there's several reasons why mempool
isn't well suited for this job.

Basically for the uncached page case we want to first pull out all the
spill pages in the lower granules[1] and only after those have been
used, do we want to start converting pages from cached to uncached.

mempool on the other hand will first try and call the user provided
allocation function and only if that fails try and take memory from
the pool, this will force us to convert pages from cached to uncached
if we don't have to.

The other issue is that mempool isn't designed to handle the case
where you do not want to hand the memory back to the system using the
user provided free() function, somehing which we can't even do for the
spill pages and converting the normal pages back is a nightmare since
you have to wait for a full granule to reappear.

Last, mempool interacts quite a lot with the vm, kicking bdflush if it
is unable to allocate memory which will not have any effect for these
kinds of pages anyway.

One could probably do this via mempool, but it would basically require
one to put another object allocator below mempool which really makes
the whole exercise pointless as this could just as well be done
standalone ... ie. genalloc.

Cheers,
Jes

[1]: For those who are interested, on ia64 one has to convert a full
granule, 16MB, at a time in order to avoid data corruption due to the
CPU might be doing speculative loads within a full granule.

  reply	other threads:[~2005-03-03  8:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-02 19:13 [patch - 2.6.11-rc5-mm1] genalloc - general purpose allocator Jes Sorensen
2005-03-02 19:33 ` David Mosberger
2005-03-03  8:21   ` Jes Sorensen [this message]
2005-03-07 19:00     ` David Mosberger

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=yq03bvdf8bf.fsf@jaguar.mkp.net \
    --to=jes@wildopensource.com \
    --cc=akpm@osdl.org \
    --cc=davidm@hpl.hp.com \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox