From: Shan Wei <shanwei@cn.fujitsu.com>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
Jeff Moyer <jmoyer@redhat.com>
Subject: Re: [PATCH 2/2] cfq-iosched: get rid of the need for __GFP_FAIL in cfq_find_alloc_queue()
Date: Thu, 02 Jul 2009 08:49:51 +0800 [thread overview]
Message-ID: <4A4C042F.7080403@cn.fujitsu.com> (raw)
In-Reply-To: <20090701093235.GX23611@kernel.dk>
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@oracle.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.
next prev parent reply other threads:[~2009-07-02 0:51 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-26 9:05 [PATCH 0/2] cfq-iosched: get rid of __GFP_NOFAIL Jens Axboe
2009-06-26 9:05 ` [PATCH 1/2] cfq-iosched: move cfqq initialization out of cfq_find_alloc_queue() Jens Axboe
2009-06-26 16:09 ` Jeff Moyer
2009-06-26 9:05 ` [PATCH 2/2] cfq-iosched: get rid of the need for __GFP_FAIL in cfq_find_alloc_queue() Jens Axboe
2009-06-26 16:25 ` Jeff Moyer
2009-06-27 18:26 ` Jens Axboe
2009-06-29 13:46 ` Jeff Moyer
2009-06-29 17:34 ` Jens Axboe
2009-06-29 17:44 ` Jeff Moyer
2009-06-29 17:48 ` Jens Axboe
2009-07-09 15:44 ` Vivek Goyal
2009-07-09 17:38 ` Jens Axboe
2009-07-09 19:59 ` Vivek Goyal
2009-07-09 20:15 ` Jens Axboe
2009-07-01 9:28 ` Shan Wei
2009-07-01 9:32 ` Jens Axboe
2009-07-02 0:49 ` Shan Wei [this message]
2009-07-02 6:33 ` Jens Axboe
2009-06-26 16:05 ` [PATCH 0/2] cfq-iosched: get rid of __GFP_NOFAIL Jeff Moyer
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=4A4C042F.7080403@cn.fujitsu.com \
--to=shanwei@cn.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=jens.axboe@oracle.com \
--cc=jmoyer@redhat.com \
--cc=linux-kernel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox