From: "Stephen C. Tweedie" <sct@redhat.com>
To: linux-sound@vger.kernel.org
Subject: Re: mmap() better than read() fro streaming, Was: Re: Streaming disk I/O kills file buffering and ma
Date: Thu, 26 Aug 1999 16:55:29 +0000 [thread overview]
Message-ID: <marc-linux-sound-93569557801143@msgid-missing> (raw)
In-Reply-To: <marc-linux-sound-93559158330469@msgid-missing>
Hi,
Benno Senoner writes:
> Yes, I run with mlockall(MCL_CURRENT|MCL_FUTURE)
> I can confirm this now:
> I just removed my memcpy()s for testing purposes, and the app loads the
> data nicely.
As it should be. mlock/mlockall apply to _all_ pages which appear in
your process' address space, regardless of whether they are page cache
or local data pages.
> Pratically this means that if you enabled MCL_FUTURE, mmap() will
> return only after all the mapped segment of the file resides in
> memory. Correct me please if I am wrong.
Yes. If MCL_FUTURE is used then all future mmap()s are automatically
marked as locked, and we do a make_pages_present() before returning
from mmap. This is exactly what mlockall is designed for: memory
access should simply never page fault if you use MCL_CURRENT |
MCL_FUTURE. This is even true for writable MAP_PRIVATE pages: if you
have full mlockall enabled, then the make_pages_present() will do a
copy-on-write page fault for you.
--Stephen
prev parent reply other threads:[~1999-08-26 16:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-linux-sound-93569557801143@msgid-missing \
--to=sct@redhat.com \
--cc=linux-sound@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox