lkml.org 
[lkml]   [2001]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: Fwd: Re: Getting FS access events
Richard Gooch <rgooch@ras.ucalgary.ca>:
> >
> OK, provided the prefetch will queue up a large number of requests
> before starting the I/O. If there was a way of controlling when the
> I/O actually starts (say by having a START flag), that would be ideal,
> I think.
>
The START flag is equivalent to the first actual read, whereupon the
elevator code will do the Right Thing.

> That opens up a nasty race: if the dentry is released before the
> pointer is harvested, you get a bogus pointer.
>
You simply increase the reference count of every dentry you visit, and
free it when the log is read.

> How's that? It won't matter if read(2) synchronises, because I'll be
> issuing the requests in device bnum order.
>
Of course it does, because the kernel needs to wait for the next read()
system call from your application, which it can only do after the first
one completes, which adds another delay which will slow you down,
especially with high-latency I/O protocols.

--
Matthias Urlichs | noris network AG | http://smurf.noris.de/
-
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: 2005-03-22 12:52    [W:0.059 / U:21.092 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site