[lkml]   [2010]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] cfq-iosched: rework seeky detection
Gui Jianfeng <> writes:

> Shaohua Li wrote:
>> On Sat, Jan 09, 2010 at 11:59:17PM +0800, Corrado Zoccolo wrote:
>>> Current seeky detection is based on average seek lenght.
>>> This is suboptimal, since the average will not distinguish between:
>>> * a process doing medium sized seeks
>>> * a process doing some sequential requests interleaved with larger seeks
>>> and even a medium seek can take lot of time, if the requested sector
>>> happens to be behind the disk head in the rotation (50% probability).
>>> Therefore, we change the seeky queue detection to work as follows:
>>> * each request can be classified as sequential if it is very close to
>>> the current head position, i.e. it is likely in the disk cache (disks
>>> usually read more data than requested, and put it in cache for
>>> subsequent reads). Otherwise, the request is classified as seeky.
>>> * an history window of the last 32 requests is kept, storing the
>>> classification result.
>>> * A queue is marked as seeky if more than 1/8 of the last 32 requests
>>> were seeky.
>>> This patch fixes a regression reported by Yanmin, on mmap 64k random
>>> reads.
>> Can we not count a big request (say the request data is >= 32k) as seeky
>> regardless the seek distance? In this way we can also make a 64k random sync
>> read not as seeky.
> Or maybe we can rely on *dynamic* CFQQ_SEEK_THR in terms of data lenght to
> determine whether a request should be a seeky one.

I'm not sure I understand the question, but it sounds like you're
assuming that the last_position tracks the beginning of the last I/O.
That's not the case. It tracks the end of the last I/O, and so it
should not matter what the request size is.


 \ /
  Last update: 2010-01-11 15:23    [W:0.084 / U:10.668 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site