From: "Stephen C. Tweedie" <sct@redhat.com>
To: "Benjamin C.R. LaHaise" <blah@kvack.org>
Cc: Gilles Pokam <pokam@cs.tu-berlin.de>,
sct@redhat.com, Linux-MM@kvack.org,
Alan Cox <number6@the-village.bc.nu>
Subject: Re: mmap() for a cluster of pages
Date: Fri, 30 Oct 1998 15:58:22 GMT [thread overview]
Message-ID: <199810301558.PAA03792@dax.scot.redhat.com> (raw)
In-Reply-To: <Pine.LNX.3.95.981026121852.9207B-100000@as200.spellcast.com>
Hi,
On Mon, 26 Oct 1998 12:39:33 -0500 (EST), "Benjamin C.R. LaHaise" <blah@kvack.org> said:
> Stephen, in replying to this, I glanced at the sound driver's mmap
> routine. They use an order > 0 buffer that they map, but don't do
> anything to prevent its being touched by the swap routines.
I'm not sure quite which bit of the sound code you mean. I can't see
anything wrong. When we create a sound buffer (drivers/sound/dmabuf.c),
we explicitly set PG_reserved on every page in the buffer. In
remap_page_range, there is the test
mapnr = MAP_NR(__va(phys_addr));
if (mapnr >= max_mapnr || PageReserved(mem_map+mapnr))
set_pte(pte, mk_pte_phys(phys_addr, prot));
which means that we won't do a remap on any page unless that page is
already protected against being seen by the swapper. I think we're
quite safe here.
> My guess is simply that noone's encountered this bug before, but it's
> there.
We should be OK. Alan will no doubt scream if I'm wrong here.
> Also, is PG_reserved the best flag for this case?
Absolutely, it's the only flag we test for consistently when playing
silly buggers with page-present page table entries.
--Stephen
--
This is a majordomo managed list. To unsubscribe, send a message with
the body 'unsubscribe linux-mm me@address' to: majordomo@kvack.org
next prev parent reply other threads:[~1998-10-30 15:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-10-26 11:44 Gilles Pokam
1998-10-26 17:39 ` Benjamin C.R. LaHaise
1998-10-30 15:58 ` Stephen C. Tweedie [this message]
1998-10-30 18:57 ` Alan Cox
1998-10-30 19:18 ` Benjamin C.R. LaHaise
1998-10-30 20:34 ` Alan Cox
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=199810301558.PAA03792@dax.scot.redhat.com \
--to=sct@redhat.com \
--cc=Linux-MM@kvack.org \
--cc=blah@kvack.org \
--cc=number6@the-village.bc.nu \
--cc=pokam@cs.tu-berlin.de \
/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