lkml.org 
[lkml]   [2011]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 1/1] CFQ: fix handling 'deep' cfqq
From
2011/8/23 Maxim Patlasov <maxim.patlasov@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).
but the cfq_disk_looks_slow isn't updated if the queue doesn't have 4 requests
or doesn't dispatch > 4 requests, so you always have CFQD_DISK_LOOKS_FAST()
return true if the first slice gets it to true. And if the queue does
dispatch > 4 requests in one jiffy, only cfq_disk_looks_fast is updated,
CFQD_DISK_LOOKS_FAST returns true too. I don't understand when
CFQD_DISK_LOOKS_FAST can be false.

Thanks,
Shaohua
--
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/

\
 
 \ /
  Last update: 2011-08-24 04:09    [W:0.052 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site