[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A4C042F.7080403@cn.fujitsu.com>
Date: Thu, 02 Jul 2009 08:49:51 +0800
From: Shan Wei <shanwei@...fujitsu.com>
To: Jens Axboe <jens.axboe@...cle.com>
CC: linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
Jeff Moyer <jmoyer@...hat.com>
Subject: Re: [PATCH 2/2] cfq-iosched: get rid of the need for __GFP_FAIL in
cfq_find_alloc_queue()
Jens Axboe said:
> On Wed, Jul 01 2009, Shan Wei wrote:
>> Jens Axboe said:
>>> Setup an emergency fallback cfqq that we allocate at IO scheduler init
>>> time. If the slab allocation fails in cfq_find_alloc_queue(), we'll just
>>> punt IO to that cfqq instead. This ensures that cfq_find_alloc_queue()
>>> never fails without having to ensure free memory.
>>>
>>> Signed-off-by: Jens Axboe <jens.axboe@...cle.com>
>>> ---
>>>
>>> @@ -1740,11 +1745,8 @@ cfq_get_queue(struct cfq_data *cfqd, int is_sync, struct io_context *ioc,
>>> cfqq = *async_cfqq;
>>> }
>>>
>>> - if (!cfqq) {
>>> + if (!cfqq)
>>> cfqq = cfq_find_alloc_queue(cfqd, is_sync, ioc, gfp_mask);
>>> - if (!cfqq)
>>> - return NULL;
>>> - }
>> I jsut reviewed the code and found that the check of cfqq is also redundant
>> after doing cfq_get_queue() in cfq_set_request.
>>
>> The patch is based on Linus's main tree.
>
> It's not redundant in Linus' tree, cfq_get_queue() can return NULL for
> != __GFP_WAIT.
>
Yes. So, the patch is only for "for-linus" branch of your tree, not for Linus's tree.
I noticed the patch is in your tree now, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists