Re: [RFC] kernel facilities for cache prefetching

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

 



Linus Torvalds writes:
 > 

[...]

 > 
 > Now, admittedly it has a few downsides:
 > 
 >  - right now "readpage()" is called in several places, and you'd have to 
 >    create some kind of nice wrapper for the most common 
 >    "mapping->a_ops->readpage()" thing and hook into there to avoid 
 >    duplicating the effort.
 > 
 >    Alternatively, you could decide that you only want to do this at the 
 >    filesystem level, which actually simplifies some things. If you 
 >    instrument "mpage_readpage[2]()", you'll already get several of the 
 >    ones you care about, and you could do the others individually.
 > 
 >    [ As a third alternative, you might decide that the only thing you
 >    actually care about is when you have to wait on a locked page, and 
 >    instrument the page wait-queues instead. ]
 > 
 >  - it will miss any situation where a filesystem does a read some other 
 >    way. Notably, in many loads, the _directory_ accesses are the important 
 >    ones, and if you want statistics for those you'd often have to do that 
 >    separately (not always - some of the filesystems just use the same 
 >    page reading stuff).

Another disadvantage is that ->readpage() can only do read-ahead within
single file, which is not helpful for the case of reading a lot of small
files (and this is what happens during startup).

And to implement reasonable multi-file read-ahead at the file system
layer one needs asynchronous inode loading interface implemented for
every file system.

Nikita.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux