From: Boaz Harrosh <bharrosh@panasas.com>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: James Bottomley <James.Bottomley@hansenpartnership.com>,
linux-scsi <linux-scsi@vger.kernel.org>,
open-osd mailing-list <osd-dev@open-osd.org>,
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
Jeff Garzik <jeff@garzik.org>, Tejun Heo <tj@kernel.org>,
"Nicholas A. Bellinger" <nab@linux-iscsi.org>
Subject: Re: [PATCH 3/5] New blk_make_request(), takes bio, returns a request
Date: Tue, 19 May 2009 16:33:42 +0300 [thread overview]
Message-ID: <4A12B536.2020900@panasas.com> (raw)
In-Reply-To: <20090519124953.GA4140@kernel.dk>
On 05/19/2009 03:49 PM, Jens Axboe wrote:
> On Tue, May 19 2009, Boaz Harrosh wrote:
>> + * WARNING: When allocating/cloning a bio-chain, careful consideration should be
>> + * given to how you allocate bios. In particular, you cannot use __GFP_WAIT for
>> + * anything but the first bio in the chain. Otherwise you risk deadlocking,
>> + * waiting for a bio to be returned to the pool, which will never return, since
>> + * it was not submitted yet.
>
> Perhaps something like:
>
> Otherwise you risk waiting for IO completion of a bio that hasn't been
> submitted yet, thus resulting in a deadlock.
>
>> + * Alternatively bios should be allocated using bio_kmalloc only.
>> + * If possible a long IO should be split into smaller parts when allocation
>> + * fails. Partial allocation should not be an error, or you risk a live-lock.
>> */
>> struct request *blk_make_request(struct request_queue *q, struct bio *bio,
>> gfp_t gfp_mask)
>
> Alternatively bios should be allocated using bio_kmalloc() instead of
> bio_alloc(), as that avoids the mempool deadlock. If possible a big IO
> should be ...
>
Thanks Jens makes much more sense.
I'm posting as reply to original patch (with version 2 at title).
I'm also reposting a small forgoten patch that belongs to Tejun's
batch.
Boaz
next prev parent reply other threads:[~2009-05-19 13:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-17 15:52 [patchset 0/5 version 2] osd: Stop usage of blk_rq_append_bio Boaz Harrosh
2009-05-17 15:55 ` [PATCH 1/5] allow blk_rq_map_kern to append to requests Boaz Harrosh
2009-05-17 15:56 ` [PATCH 2/5] libosd: Use new blk_rq_map_kern Boaz Harrosh
2009-05-17 15:57 ` [PATCH 3/5] New blk_make_request(), takes bio, returns a request Boaz Harrosh
2009-05-19 9:41 ` Jens Axboe
2009-05-19 10:07 ` Boaz Harrosh
2009-05-19 10:13 ` Jens Axboe
2009-05-19 12:27 ` Boaz Harrosh
2009-05-19 12:49 ` Jens Axboe
2009-05-19 13:33 ` Boaz Harrosh [this message]
2009-05-19 13:35 ` [PATCH version 2] " Boaz Harrosh
2009-05-19 17:53 ` Jens Axboe
2009-05-17 15:58 ` [PATCH 4/5] libosd: Use of new blk_make_request Boaz Harrosh
2009-05-17 16:00 ` [PATCH 5/5] Un-export blk_rq_append_bio Boaz Harrosh
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=4A12B536.2020900@panasas.com \
--to=bharrosh@panasas.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=jeff@garzik.org \
--cc=jens.axboe@oracle.com \
--cc=linux-scsi@vger.kernel.org \
--cc=nab@linux-iscsi.org \
--cc=osd-dev@open-osd.org \
--cc=tj@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.