mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Corrado Zoccolo <czoccolo@gmail.com>
To: Shaohua Li <shaohua.li@intel.com>
Cc: jens.axboe@oracle.com, linux-kernel@vger.kernel.org,
	jmoyer@redhat.com, vgoyal@redhat.com, guijianfeng@cn.fujitsu.com,
	yanmin_zhang@linux.intel.com
Subject: Re: [PATCH]cfq-iosched: don't stop async queue with async requests  pending
Date: Wed, 13 Jan 2010 09:18:47 +0100	[thread overview]
Message-ID: <4e5e476b1001130018n2ad9e830s4a20d922abd4c7bb@mail.gmail.com> (raw)
In-Reply-To: <20100113074442.GA10492@sli10-desk.sh.intel.com>

On Wed, Jan 13, 2010 at 8:44 AM, Shaohua Li <shaohua.li@intel.com> wrote:
> My SSD speed of direct write is about 80m/s, while I test page writeback,
> the speed can only go to 68m/s. Below patch fixes this.
> It appears we missused cfq_should_idle in cfq_may_dispatch. cfq_should_idle
> means a queue should idle because it's seekless sync queue or it's the last queue,
> which is to maintain service tree time slice. So it doesn't mean the
> last queue is always a sync queue. If the last queue is asyn queue,
> we definitely shouldn't stop dispatch requests because of pending async
> requests.

An other option is that cfq_should_idle returns false for async
queues, since cfq will never idle on them.

Corrado
>
> Signed-off-by: Shaohua Li <shaohua.li@intel.com>
>
> diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
> index 918c7fd..8198079 100644
> --- a/block/cfq-iosched.c
> +++ b/block/cfq-iosched.c
> @@ -2222,7 +2222,8 @@ static bool cfq_may_dispatch(struct cfq_data *cfqd, struct cfq_queue *cfqq)
>        /*
>         * Drain async requests before we start sync IO
>         */
> -       if (cfq_should_idle(cfqd, cfqq) && cfqd->rq_in_driver[BLK_RW_ASYNC])
> +       if (cfq_cfqq_sync(cfqq) && cfq_should_idle(cfqd, cfqq)
> +               && cfqd->rq_in_driver[BLK_RW_ASYNC])
>                return false;
>
>        /*
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>



-- 
__________________________________________________________________________

dott. Corrado Zoccolo                          mailto:czoccolo@gmail.com
PhD - Department of Computer Science - University of Pisa, Italy
--------------------------------------------------------------------------
The self-confidence of a warrior is not the self-confidence of the average
man. The average man seeks certainty in the eyes of the onlooker and calls
that self-confidence. The warrior seeks impeccability in his own eyes and
calls that humbleness.
                               Tales of Power - C. Castaneda

  reply	other threads:[~2010-01-13  8:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-13  7:44 Shaohua Li
2010-01-13  8:18 ` Corrado Zoccolo [this message]
2010-01-13  8:23   ` Shaohua Li
2010-01-13 11:13     ` Vivek Goyal
2010-01-14  3:41       ` Shaohua Li
2010-01-14  5:27         ` Gui Jianfeng
2010-01-14  6:17           ` Shaohua Li
2010-01-14  8:21             ` Gui Jianfeng
2010-01-14  9:04               ` Shaohua Li
2010-01-14 11:09             ` Vivek Goyal
2010-01-19  0:52               ` Li, Shaohua
2010-01-19 22:33                 ` Vivek Goyal
2010-01-13 11:10 ` Vivek Goyal
2010-01-13 21:30   ` Corrado Zoccolo
2010-01-13 22:26     ` Vivek Goyal
2010-01-14  2:46 ` Gui Jianfeng
2010-01-14  3:43   ` Shaohua Li

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=4e5e476b1001130018n2ad9e830s4a20d922abd4c7bb@mail.gmail.com \
    --to=czoccolo@gmail.com \
    --cc=guijianfeng@cn.fujitsu.com \
    --cc=jens.axboe@oracle.com \
    --cc=jmoyer@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shaohua.li@intel.com \
    --cc=vgoyal@redhat.com \
    --cc=yanmin_zhang@linux.intel.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

all inboxes | Powered by JetHome®