From: David Gibson <david@gibson.dropbear.id.au>
To: Paul Mackerras <paulus@samba.org>
Cc: Tom Rini <trini@kernel.crashing.org>,
linuxppc-embedded@lists.linuxppc.org
Subject: Re: consistent_free()
Date: Thu, 27 Jun 2002 12:42:06 +1000 [thread overview]
Message-ID: <20020627024206.GU9087@zax> (raw)
In-Reply-To: <15641.53391.924751.554517@argo.ozlabs.ibm.com>
On Wed, Jun 26, 2002 at 10:32:47AM -0400, Paul Mackerras wrote:
>
> David Gibson writes:
>
> > Well, I had a look at the ARM version and now I'm a bit confused. As
> > far as I can tell it does two things differently from us:
> > 1) After making the allocation rounded up to the appropriate
> > order it frees any leftover pages. That certainly seems worthwhile.
> > 2) It sets PageReserved on each struct page that it
> > allocates/remaps.
> >
> > (2) seems very strange. It doesn't seem in keeping with the meaning
> > of PageReserved (well my best guess at the meaning from only slightly
>
> PageReserved means that the VM system shouldn't try to manage this
> page. In particular, it shouldn't try to do the page aging/move to
> swap cache/swap out stuff that it will do on normal pages.
Ok, it's still not clear to me whether we need to set PageReserved or
not. Is memory we've allocated with get_free_pages() safe to use
without fear of it being swapped from under us or not?
Surely it couldn't be swapped, since it resides in the kernel lowmem
mapping.
> > illuminating comments in page.h). Apparently it's so that
> > remap_page_range() works - as indeed it wouldn't without this because
> > of a test in remap_pte_range() which that calls. But that test looks
> > to be precisely inverted from what it should be. Which makes me
>
> No, it's right. remap_page_range() is only meant to be used for pages
> that are either memory-mapped I/O (the !VALID_PAGE(page) test) or for
> pages that are "special" (the PageReserved(page) test). You aren't
> supposed to use remap_page_range on normal RAM that the VM is
> managing.
Ah, ok that makes some sense. I think the comment above
remap_page_range() needs rewriting, though.
> > wonder how the hell anything works now, since remap_page_range() is
> > apparently called from several places.
>
> It's only called from drivers (such as /dev/mem) or from arch-specific
> code AFAICS.
--
David Gibson | For every complex problem there is a
david@gibson.dropbear.id.au | solution which is simple, neat and
| wrong. -- H.L. Mencken
http://www.ozlabs.org/people/dgibson
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2002-06-27 2:42 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-14 4:29 consistent_free() David Gibson
2002-06-14 5:57 ` consistent_free() David Gibson
2002-06-24 2:15 ` consistent_free() David Gibson
2002-06-25 14:39 ` consistent_free() Tom Rini
2002-06-26 5:17 ` consistent_free() David Gibson
2002-06-26 5:33 ` consistent_free() Dan Malek
2002-06-26 5:59 ` consistent_free() David Gibson
2002-06-26 14:32 ` consistent_free() Paul Mackerras
2002-06-27 2:42 ` David Gibson [this message]
2002-06-14 15:39 ` consistent_free() Tom Rini
2002-06-14 16:44 ` consistent_free() Dan Malek
2002-06-14 17:10 ` consistent_free() Tom Rini
2002-06-14 21:34 ` consistent_free() Dan Malek
2002-06-15 6:11 ` consistent_free() Paul Mackerras
2002-06-15 6:42 ` consistent_free() Dan Malek
2002-06-15 10:02 ` consistent_free() Paul Mackerras
2002-06-15 13:51 ` consistent_free() Dan Malek
2002-06-15 6:02 ` consistent_free() Paul Mackerras
2002-06-15 6:27 ` consistent_free() Dan Malek
2002-06-15 6:57 ` consistent_free() David Gibson
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=20020627024206.GU9087@zax \
--to=david@gibson.dropbear.id.au \
--cc=linuxppc-embedded@lists.linuxppc.org \
--cc=paulus@samba.org \
--cc=trini@kernel.crashing.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;
as well as URLs for NNTP newsgroup(s).