linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Benjamin LaHaise <bcrl@redhat.com>
Cc: Rik van Riel <riel@conectiva.com.br>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: mempool design
Date: Sat, 15 Dec 2001 23:18:33 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.33.0112152235340.26748-100000@localhost.localdomain> (raw)
In-Reply-To: <20011215134711.A30548@redhat.com>


On Sat, 15 Dec 2001, Benjamin LaHaise wrote:

> [...] The design for reservations is to use enforced accounting limits
> to achive the effect of seperate memory pools. [...]

how is this going to handle higher-order pools? How is this going to
handle the need for composite allocations?

I think putting in reservation for higher-order pages is going to make
some parts of page_alloc.c *really* complex, and this complexity i dont
think we need.

> [...] Mempool's design is to build seperate pools on top of existing
> pools of memory. Can't you see the obvious duplication that implies?

no. Mempool's design is to build preallocated, reserved,
guaranteed-allocation pools on top of simpler allocators. Simpler
allocators will try reasonably hard to get something allocated, but might
fail as well. The majority of allocations within the kernel has no
deadlock relevance at all. If we allocate a new file structure, or create
a new socket, or are trying to page in overcommitted memory then we can
return with -ENOMEM (or OOM) just fine. Allocators are simpler and faster
without built-in deadlock avoidance and 'reserves'.

so the difference in design is that you are trying to add reservations as
a feature of the allocators themselves, while i'm trying to add it as a
generic, allocator-independent subsystem, which also solved a number of
other problems we always had in the IO code. Under this design, the 'pure'
allocators themselves have no concept of reserved pools at all, so there
is no duplication in concepts. (and no duplication of code.)

so the fundamental question is, should reservation be a core functionality
of allocators, or should it be a separate subsystem. *If* it can be put
into the core allocators (page allocator, SLAB) that gives us all the
features that mempool gives us today then i think i'd like that approach.
But i cannot really see how the composite allocation thing can be done via
reservations.

	Ingo


  reply	other threads:[~2001-12-15 20:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-15 19:40 mempool design Ingo Molnar
2001-12-15 18:47 ` Benjamin LaHaise
2001-12-15 22:18   ` Ingo Molnar [this message]
2001-12-17 15:04     ` Andrea Arcangeli
2001-12-17 15:38       ` Victor Yodaiken
2001-12-17 16:10         ` Andrea Arcangeli
2001-12-17 17:33         ` kernel panic Geoffrey
2001-12-18 16:55         ` mempool design Ingo Molnar
2001-12-18 16:06           ` Victor Yodaiken
2001-12-17 17:21       ` Ingo Molnar
2001-12-17 15:58         ` Andrea Arcangeli
2001-12-18  0:32           ` Rik van Riel
2001-12-18 15:21       ` Alan Cox
  -- strict thread matches above, loose matches on Subject: below --
2001-12-15  9:01 Ingo Molnar
2001-12-15 15:39 ` Rik van Riel

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=Pine.LNX.4.33.0112152235340.26748-100000@localhost.localdomain \
    --to=mingo@elte.hu \
    --cc=bcrl@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=riel@conectiva.com.br \
    /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).