From: Jens Axboe <jens.axboe@oracle.com>
To: Vivek Goyal <vgoyal@redhat.com>
Cc: jmoyer@redhat.com, linux-kernel@vger.kernel.org,
guijianfeng@cn.fujitsu.com
Subject: Re: [PATCH 2/2] cfq-iosched: Take care of corner cases of group losing share due to deletion
Date: Wed, 9 Dec 2009 14:56:39 +0100 [thread overview]
Message-ID: <20091209135639.GW8742@kernel.dk> (raw)
In-Reply-To: <1260312778-4725-2-git-send-email-vgoyal@redhat.com>
On Tue, Dec 08 2009, Vivek Goyal wrote:
> If there is a sequential reader running in a group, we wait for next request
> to come in that group after slice expiry and once new request is in, we expire
> the queue. Otherwise we delete the group from service tree and group looses
> its fair share.
>
> So far I was marking a queue as wait_busy if it had consumed its slice and
> it was last queue in the group. But this condition did not cover following
> two cases.
>
> 1.If a request completed and slice has not expired yet. Next request comes
> in and is dispatched to disk. Now select_queue() hits and slice has expired.
> This group will be deleted. Because request is still in the disk, this queue
> will never get a chance to wait_busy.
>
> 2.If request completed and slice has not expired yet. Before next request
> comes in (delay due to think time), select_queue() hits and expires the
> queue hence group. This queue never got a chance to wait busy.
>
> Gui was hitting the boundary condition 1 and not getting fairness numbers
> proportional to weight.
>
> This patch puts the checks for above two conditions and improves the fairness
> numbers for sequential workload on rotational media. Check in select_queue()
> takes care of case 1 and additional check in should_wait_busy() takes care
> of case 2.
I think this (and 1/2) look fine, just one minor comment:
> @@ -3250,6 +3264,36 @@ static void cfq_update_hw_tag(struct cfq_data *cfqd)
> cfqd->hw_tag = 0;
> }
>
> +static inline bool
> +cfq_should_wait_busy(struct cfq_data *cfqd, struct cfq_queue *cfqq)
> +{
That's too large to inline.
--
Jens Axboe
next prev parent reply other threads:[~2009-12-09 13:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-08 22:52 [PATCH 1/2] cfq-iosched: Get rid of cfqq wait_busy_done flag Vivek Goyal
2009-12-08 22:52 ` [PATCH 2/2] cfq-iosched: Take care of corner cases of group losing share due to deletion Vivek Goyal
2009-12-09 13:56 ` Jens Axboe [this message]
2009-12-09 15:17 ` Vivek Goyal
2009-12-09 18:50 ` Jens Axboe
2009-12-09 19:06 ` Jeff Moyer
2009-12-09 20:39 ` Vivek Goyal
2009-12-09 19:03 ` [PATCH 1/2] cfq-iosched: Get rid of cfqq wait_busy_done flag 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=20091209135639.GW8742@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=guijianfeng@cn.fujitsu.com \
--cc=jmoyer@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vgoyal@redhat.com \
/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