mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Brian Gerst <bgerst@didntduck.org>
Cc: Paul Mundt <paul.mundt@nokia.com>, Ingo Molnar <mingo@elte.hu>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [RFC] mempool_alloc() pre-allocated object usage
Date: Tue, 04 Oct 2005 11:06:16 +1000	[thread overview]
Message-ID: <1128387976.12501.12.camel@npiggin-nld.site> (raw)
In-Reply-To: <4341476A.80809@didntduck.org>

On Mon, 2005-10-03 at 10:59 -0400, Brian Gerst wrote:
> Paul Mundt wrote:
> > The downside to this is that some people may be expecting that
> > pre-allocated elements are used as reserve space for when regular
> > allocations aren't possible. In which case, this would break that
> > behaviour.
> 
> This is the original intent of the mempool.  There must be objects in 
> reserve so that the machine doesn't deadlock on critical allocations 
> (ie. disk writes) under memory pressure.
> 

No, the semantics are that at least 'min' objects must be able to
be allocated at one time. The user must be able to proceed far enough
to release its objects in this case, and that ensures no deadlock.

The problem with using the pool first is that it requires the lock
to be taken and is also not NUMA aware. So from a scalability point of
view, I don't think it is a good idea.

Perhaps you could introduce a new mempool allocation interface to do
it your way?

Nick

-- 
SUSE Labs, Novell Inc.



Send instant messages to your online friends http://au.messenger.yahoo.com 

      reply	other threads:[~2005-10-04  1:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-03 14:36 Paul Mundt
2005-10-03 14:49 ` Arjan van de Ven
2005-10-03 16:21   ` Paul Mundt
2005-10-05 21:35     ` Marcelo Tosatti
2005-10-04  6:59   ` Jens Axboe
2005-10-03 14:59 ` Brian Gerst
2005-10-04  1:06   ` Nick Piggin [this message]

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=1128387976.12501.12.camel@npiggin-nld.site \
    --to=nickpiggin@yahoo.com.au \
    --cc=bgerst@didntduck.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paul.mundt@nokia.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

all inboxes | Powered by JetHome®