linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Auguste Mome <augustmome@gmail.com>
To: Christoph Lameter <cl@linux-foundation.org>
Cc: David Rientjes <rientjes@google.com>,
	Pekka Enberg <penberg@cs.helsinki.fi>,
	linux-mm@kvack.org
Subject: Re: way to allocate memory within a range ?
Date: Sun, 21 Mar 2010 10:38:45 +0100	[thread overview]
Message-ID: <17cb70ee1003210238u72aedb0dr78f7909ee4964d4b@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1002232014200.15526@router.home>

OK thanks for your comments, I found that mempool() API can do the job
I need, because
I can live with a fixed size for allocated object, so I plan to
populate the pool by adding all the
"cells" of the given range.
My use case is another module aside Linux that would map the the same
memory area.

August.

On Wed, Feb 24, 2010 at 4:35 PM, Christoph Lameter
<cl@linux-foundation.org> wrote:
> On Tue, 23 Feb 2010, David Rientjes wrote:
>
>> > Or slab/slub system is not designed for this, I should forget it and
>> > opt for another system?
>> >
>>
>> No slab allocator is going to be designed for that other than SLAB_DMA to
>> allocate from lowmem.  If you don't have need for lowmem, why do you need
>> memory only from a certain range?  I can imagine it would have a usecase
>> for memory hotplug to avoid allocating slab that cannot be reclaimed on
>> certain nodes, but ZONE_MOVABLE seems more appropriate to guarantee such
>> migration properties.
>
> Awhile ago I posted a patch to do just that. It was called
> alloc_pages_range() and the intend was to replace the dma zone.
>
> http://lkml.indiana.edu/hypermail/linux/kernel/0609.2/2096.html
>
>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2010-03-21  9:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-24  0:46 way to allocate memory within a range ? Auguste Mome
2010-02-24  1:47 ` David Rientjes
2010-02-24 15:35   ` Christoph Lameter
2010-03-21  9:38     ` Auguste Mome [this message]
2010-02-24  1:53 ` KAMEZAWA Hiroyuki

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=17cb70ee1003210238u72aedb0dr78f7909ee4964d4b@mail.gmail.com \
    --to=augustmome@gmail.com \
    --cc=cl@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=penberg@cs.helsinki.fi \
    --cc=rientjes@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).