Re: Hint API



On Wed, 2006-11-22 at 13:48 +0100, ensonic wrote:
> hi,
> 
> I wonder if something like this could be included in the gnomevfs-ng. We're
> using the gnomevfs for http-streaming and also for normal file access
> (playing media). In both cases we mainly access file sequentialy. For local
> files one could use madvise() to set hint about the sequential access.
> Likewise for the streaming from http there exists (some controversial)
> setsockopt() for wifi devices that hints about the streaming case (for
> power management).
> 
> I don't have any other use cases yet. What are you thinking about it?

We already do:
#ifdef HAVE_POSIX_FADVISE
	if (! (mode & GNOME_VFS_OPEN_RANDOM)) {
		posix_fadvise (fd, 0, 0, POSIX_FADV_SEQUENTIAL);
	}
#endif

on open. 

I'm not sure what use madvise would have. That only affects mmaped
memory.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a war-weary moralistic senator living undercover at Ringling Bros. 
Circus. She's a green-fingered cigar-chomping safe cracker who can talk to 
animals. They fight crime! 




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