linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: "Randy.Dunlap" <rddunlap@osdl.org>
Cc: Suparna Bhattacharya <suparna@sparklet.in.ibm.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] 2.5.44: lkcd (9/9): dump driver and build files
Date: Tue, 22 Oct 2002 16:59:43 +0200	[thread overview]
Message-ID: <20021022145943.GC5616@suse.de> (raw)
In-Reply-To: <Pine.LNX.4.33L2.0210220743030.13752-100000@dragon.pdx.osdl.net>

On Tue, Oct 22 2002, Randy.Dunlap wrote:
> On Tue, 22 Oct 2002, Jens Axboe wrote:
> 
> | On Tue, Oct 22 2002, Suparna Bhattacharya wrote:
> | > On Mon, 21 Oct 2002 19:43:20 +0530, Christoph Hellwig wrote:
> | >
> | >
> | > >> +
> | > >> +	if ((dump_bio = kmalloc(sizeof(struct bio), GFP_KERNEL)) == NULL) { +
> | > >> 	DUMP_PRINTF("Cannot allocate bio\n"); +		retval = -ENOMEM;
> | > >> +		goto err2;
> | > >> +	}
> | > >
> | > > Shouldn't you use the generic bio allocator?
> | > >
> | >
> | > Not sure that this should come from the bio mempool. Objects
> | > allocated from the mem pool are expected to be released back to
> | > the pool within a reasonable period (after i/o is done), which is
> | > not quite the case here.
> | >
> | > Dump preallocates the bio early when configured and holds on to
> | > it all through the time the system is up (avoids allocs at
> | > actual dump time). Doesn't seem like the right thing to hold
> | > on to a bio mempool element that long.
> |
> | Definitely, one must not use the bio pool for long term allocations.
> 
> "must not" ?

Yes

> what happens if one does do that?  [not suggesting doing that]

Well, the whole concept behind mempool and deadlock-free allocation
while doing io, builds on that if slab allocation fails we fall back to
a private pool. If allocation from the private pool also fails, then we
_know_ we have io in progress that will finish "shortly". This is what
makes it safe to sleep on the private pool. Once you start doing long
term allocations from the bio pool, we can no longer make this
guarentee.

-- 
Jens Axboe


      reply	other threads:[~2002-10-22 14:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-21 10:16 [PATCH] 2.5.44: lkcd (9/9): dump driver and build files Matt D. Robinson
2002-10-21 21:21 ` Christoph Hellwig
2002-10-21 19:07   ` Matt D. Robinson
2002-10-21 22:06   ` Piet Delaney
2002-10-22 18:47     ` Christoph Hellwig
2002-10-22 11:57       ` Keith Owens
2002-10-22 22:21         ` Piet Delaney
2002-10-22 22:56           ` Keith Owens
2002-10-22 16:49       ` Matt D. Robinson
2002-10-22  2:04   ` Nicholas Wourms
2002-10-22  5:45     ` Matt D. Robinson
2002-10-22 13:00     ` Christoph Hellwig
2002-10-22 15:05   ` Suparna Bhattacharya
2002-10-22  9:49     ` Jens Axboe
2002-10-22 14:43       ` Randy.Dunlap
2002-10-22 14:59         ` Jens Axboe [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=20021022145943.GC5616@suse.de \
    --to=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rddunlap@osdl.org \
    --cc=suparna@sparklet.in.ibm.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).