Re: [PATCH 3/5] New blk_make_request(), takes bio, returns a request

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux