All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxim Patlasov <maxim.patlasov@gmail.com>
To: Shaohua Li <shli@kernel.org>
Cc: axboe@kernel.dk, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] CFQ: fix handling 'deep' cfqq
Date: Tue, 23 Aug 2011 12:56:02 +0400	[thread overview]
Message-ID: <CA+X1aCRSADrUB+YVJ9j5u+VgGn=8fKw7A1eVVzPtODg+hK-B-w@mail.gmail.com> (raw)
In-Reply-To: <CANejiEWadFK9GdXSwKgzNoj1Da_4QTUidTp-6FGkBtZwhbKvfw@mail.gmail.com>

Hi,

>> An aproach suggested here avoids performance degradations mentioned above.
>> With this patch applied, the performance on slow hdd is the same as it used
>> to be before 8e1ac6655104bc6e1e79d67e2df88cc8fa9b6e07, and, on fast h/w-raids,
>> it's roughly the same as for noop scheduler or CFQ with slice_idle=0.
> idle is a usual cause of cfq performance issue. did you have test in
> disk without NCQ?

Yes, on the node with "slow hdd" CFQ detected it as hw_tag=0. I
explained what I tested in cover message (subj: [PATCH 0/1] CFQ:
fixing performance issues).

> And did you test if this will hurt the performance of Vivek's original problem?

No. What's Vivek's original problem?

> snip
>> +       if (cfq_cfqq_deep_early(cfqq) && cfqq->n_dispatched >= CFQQ_DEEP_THR) {
>> +               if (cfqq->first_dispatch == jiffies)
>> +                       cfqd->cfq_disk_looks_fast++;
>> +               else
>> +                       cfqd->cfq_disk_looks_slow++;
>> +
> jiffies is too coarse here. A disk with NCQ can dispatch several
> requests within one jiffy.

If a disk with NCQ dispatches four requests in raw within one jiffy
regularly, the patch I suggested will claim it as "fast enough". It
should be beneficial to disable idling for deep&seeky cfqq in this
case, imho. Anyway, existing code:

>	/*
>	 * This is a deep seek queue, but the device is much faster than
>	 * the queue can deliver, don't idle
>	 **/
>	if (CFQQ_SEEKY(cfqq) && cfq_cfqq_idle_window(cfqq) &&
>	    (cfq_cfqq_slice_new(cfqq) ||
>	    (cfqq->slice_end - jiffies > jiffies - cfqq->slice_start))) {
>		cfq_clear_cfqq_deep(cfqq);
>		cfq_clear_cfqq_idle_window(cfqq);
>	}
>

would surely disable idling in this case. So, the patch I suggested
doesn't make things worse (as compared with existing implementation).

Thanks,
Maxim

  reply	other threads:[~2011-08-23  8:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-19 15:38 [PATCH 0/1] CFQ: fixing performance issues Maxim Patlasov
2011-08-19 15:38 ` [PATCH 1/1] CFQ: fix handling 'deep' cfqq Maxim Patlasov
2011-08-23  2:44   ` Shaohua Li
2011-08-23  8:56     ` Maxim Patlasov [this message]
2011-08-24  2:06       ` Shaohua Li
2011-08-31  9:12         ` Maxim Patlasov
2011-09-06  1:03           ` Shaohua Li
2011-09-06 15:42             ` Maxim Patlasov
2011-09-09  4:43               ` Shaohua Li
2011-09-09 17:41                 ` Maxim Patlasov
2011-09-12 13:09                   ` Maxim Patlasov
2011-09-13  3:30                     ` Shaohua Li
2011-09-13 12:46                       ` Maxim Patlasov
2011-09-14  5:12                         ` 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='CA+X1aCRSADrUB+YVJ9j5u+VgGn=8fKw7A1eVVzPtODg+hK-B-w@mail.gmail.com' \
    --to=maxim.patlasov@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shli@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.