Re: [rfc][patch] remove racy sync_page?

Nick Piggin
2006-06-02T02:39:49Z

Nick Piggin wrote:
> Linus Torvalds wrote:
>
>>
>> On Thu, 1 Jun 2006, Nick Piggin wrote:
>>
>>> If this wasn't clear: I don't mean per-task plugs as in "the task
>>> explicitly plugs and unplugs the block device"[*]; I mean really
>>> per-task plugs.
>>
>>
>>
>> That would be insane. It would mean that you'd have to unplug whether you
>
>
> I don't think it is.
>
>> wanted to or not. Ie you've now made "sys_readahead()" impossible to
>> do well, and doing read-ahead across multiple files.
>
>
> Now it is you who are ignoring what I've been saying. I've been saying
> that I don't think your sys_readahead examples have had much to do with
> plugging:
>
> 1. If there are no other requests to seek to, plugging doesn't matter;
> 2. If there are other requests to seek to, the queue won't be plugged
> or will soon become unplugged anyway. So the current system isn't
> somehow going to do the right thing every time and be immune to
> seeking.

Lastly, an app can still issue multiple sys_readaheads and still get
seek protection -- it isn't like disks have suddenly got faster than
CPUs overnight.

as-iosched.c can handle the case where a request goes out to disk, and
later a new one comes in nearby (deadline IIRC isn't good at this
unfortunately, nor does it seek backwards)

OTOH, if you're using as-iosched.c, you explicitly get a good amount of
seek protection anyway.

--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com