All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* Re: mmap() better than read() fro streaming, Was: Re: Streaming disk I/O kills file buffering and ma
@ 1999-08-25 14:21 Alan Cox
  1999-08-25 14:33 ` mmap() better than read() fro streaming, Was: Re: Streaming disk I/O kills file buffering and makes Benno Senoner
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Alan Cox @ 1999-08-25 14:21 UTC (permalink / raw
  To: linux-sound

> As you suggested I do basically the following:
> - ptr=mmap() at current offset with lenQ2k
> - memcpy(targetbuffer,ptr,len)   (I must use the memcpy since targetbuffer has
> to   be mlocked() since the audio-playing thread can't tolerate pagefaults
> because   it runs in a low-latency cycle.
> - munmap(ptr,len)

You can do 
	ptr=mmap(blah)
	mlock(ptr, ...)
	munmap(ptr, len)

> Does anyone know if there it/will be a way to do unbuffered mmap()  ?
> I think streaming apps would benefit quite a bit from this.

mmap requires buffering - you are sharing the page with the system page
cache. If you mean you want an mgoaway() to go with munmap() thats what
madvise() provides on some other systems but not Linux yet

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1999-08-26 16:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-08-25 14:21 mmap() better than read() fro streaming, Was: Re: Streaming disk I/O kills file buffering and ma Alan Cox
1999-08-25 14:33 ` mmap() better than read() fro streaming, Was: Re: Streaming disk I/O kills file buffering and makes Benno Senoner
1999-08-25 15:02 ` mmap() better than read() fro streaming, Was: Re: Streaming disk I/O kills file buffering and ma Benno Senoner
1999-08-25 15:39 ` mmap() better than read() fro streaming, Was: Re: Streaming disk Andrea Arcangeli
1999-08-25 16:16 ` mmap() better than read() fro streaming, Was: Re: Streaming disk I/O kills file buffering and ma Benno Senoner
1999-08-26 16:55 ` Stephen C. Tweedie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.