lkml.org 
[lkml]   [2015]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v3 01/11] block: make generic_make_request handle arbitrarily sized bios
From
On Wed, May 20, 2015 at 11:58 AM, Jeff Moyer <jmoyer@redhat.com> wrote:
> Ming Lin <mlin@kernel.org> writes:
>
>> On Mon, May 18, 2015 at 9:52 AM, Jeff Moyer <jmoyer@redhat.com> wrote:
>>> Ming Lin <mlin@kernel.org> writes:
>>>
>>>> diff --git a/block/blk-core.c b/block/blk-core.c
>>>> index fd154b9..909f317 100644
>>>> --- a/block/blk-core.c
>>>> +++ b/block/blk-core.c
>>>> @@ -617,6 +617,10 @@ struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id)
>>>> if (q->id < 0)
>>>> goto fail_q;
>>>>
>>>> + q->bio_split = bioset_create(4, 0);
>>>> + if (!q->bio_split)
>>>> + goto fail_id;
>>>> +
>>>
>>> Arbitrary numbers should be documented.
>>
>> Kent,
>>
>> Is there specific reason to choose number 4?
>> If no, I may change it to BIO_POOL_SIZE which is 2.
>
> Here's what he had to say last time around:
>
> On Mon, Nov 25, 2013 at 10:09:21PM -0800, Christoph Hellwig wrote:
> > > + q->bio_split = bioset_create(4, 0);
> > > + if (!q->bio_split)
> > > + goto fail_id;
> >
> > How did we arrive at a mempool size of 4 to make sure we can always make
> > progress with arbitrarily sized bios? Shouldn't we document the design
> > decision somewhere?
>
> It just has to be nonzero to guarantee forward progress - the

Then I'll update it to BIO_POOL_SIZE.

> bio_alloc_bioset() rescuer thing I did awhile back guarantees that.
>
> link: https://lkml.org/lkml/2013/11/26/47
>
> Cheers,
> Jeff


\
 
 \ /
  Last update: 2015-05-20 22:41    [W:0.098 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site