Re: Ottawa - kernel hackers ...



Alan Cox <alan redhat com> writes:

> > 	Fancy elevators, improved schedulers, etc. are all very fun but
> > improving the swap performance[1], and doing more intelligent predictive
> > read-ahead is what we need surely ? :-)
> 
> Fancy elevator algorithms and the readahead stuff people are fiddling with
> are as relevant to the desktop as big servers.

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.

I am fairly clueless about these things, but it seems to me that this
would have two benefits:

        - 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.

        - The application could overlay CPU activity with disk
          activity. Of course that is already possible by spawning a
          thread, but for various reasons it would be better if it
          could be done single-threaded.

Given a way to do asynchronous i/o, another thing that could be useful
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.

I got this idea from Windows XP. Their version of it is described
here:

   http://msdn.microsoft.com/msdnmag/issues/01/12/XPKernel/default.aspx

under the heading "Prefetch".


Søren



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