Re: Ottawa - kernel hackers ...

> Is there a way for an application to say essentially "read this, write
> this, read that, and tell me when you are done"? Ie., doing disk
> access asynchronously. I know of aio_*, but they are undocumented and
> seem to be implemented by spawning threads.

In the Linux world you have readahead() but its non standard. Older Linux
has POSIX AIO using threads, 2.5.x and some vendor 2.4.x implement the
same functionality kernel side. Using posix AIO as an option is the right
approach because readahead is linux magic while AIO will work on most modern
unixen and is portable

>         - The elevator algorithm would get more input to work
>           on. Instead of seeing the disk requests one at a time and
>           having to seek to a random place for each one, it would see
>           a lot of requests and be able to sort them so they could be
>           read in one go.


> in the kernel is a way for applications to monitor pagefaults. This
> would allow applications to generate a list of disk accesses during
> startup. Then the next time they start, instead of waiting for what is
> very likely going to be the same set of pagefaults, they just ask for
> that data to be read in immediately.

That actually doesnt help much. What you have to do is figure out the
stuff used together and arrange the code to be clustered together better.
At that point loading big chunks on page faults helps a lot.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]