Indeed. One should be able to tell the kernel "as soon as I have read
this data I'm _never_ going to need it again". Not only a good idea
for streaming servers, how about backups? I'm forced to do backups
at night on our servers because during a backup it becomes way
to slow. Not because of the I/O going on, but because the backup process
keeps on filling the buffer and page cache with data nobody will never
need anymore while useful data is being thrown out.
You actually don't want to use raw I/O for this since you do want
things like readahead. You do want to be able to say that, once read,
you don't need the data ever again. Simply put the page at the start
of the LRU chain. Easy for read(), hard for mmap(), but for mmap you
could use madvise()
Mike.
-- ... somehow I have a feeling the hurting hasn't even begun yet -- Bill, "The Terrible Thunderlizards"- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/