lkml.org 
[lkml]   [1996]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Question about ll_rw_blk.c, add_request()
Hi,

On Tue, 16 Apr 1996 13:05:19 +0200 (MESZ), Bernd Schmidt
<crux@pool.informatik.rwth-aachen.de> said:

> Just one short question to make sure I understand the code: In
> add_request(), new requests for the hardware are put in a queue. I
> think that there are not supposed to be several requests for the
> same sector in the queue at the same time, e.g. one reading the
> sector and one writing it.

Actually, the low level device code will work perfectly happily with
multiple IO requests for a single sector. The request list is just a
list of independent outstanding requests, and there are no particular
restrictions on what the requests may be. The only special case is of
strictly adjacent requests, which get merged to improve performance;
overlapping requests do not get merged.

> I think that the buffer and page caches try to avoid this
> situation. Is this correct?

Yes. Obviously, there is scope for much confusion if you submit
two simultaneous IO requests for one sector, so it is best to avoid
that, but it's up to the higher layers to make sure it doesn't
happen.

Cheers,
Stephen.
--
Stephen Tweedie <sct@dcs.ed.ac.uk>
Department of Computer Science, Edinburgh University, Scotland.


\
 
 \ /
  Last update: 2005-03-22 13:36    [from the cache]
©2003-2011 Jasper Spaans