From: Sean Neakums <sneakums@zork.net>
To: Tyler <tyler@agat.net>
Cc: linux-mm@kvack.org
Subject: Re: Memory management questions
Date: Sun, 13 Jun 2004 14:55:31 +0100 [thread overview]
Message-ID: <6uekoj36lo.fsf@zork.zork.net> (raw)
In-Reply-To: <cafjtv$76d$2@sea.gmane.org> (tyler@agat.net's message of "Sat, 12 Jun 2004 21:02:16 +0200")
Tyler <tyler@agat.net> writes:
> I've always thinked that paging or virtual memory was practical to
> avoid memory fragmentation. I thinked that you can map contiguous
> virtual pages to non contiguous physical page frames.
> But let's take a look at the macros __va(x) and __pa(x) :
> #define __pa(x) ((unsigned long)x-PAGE_OFFSET)
> #define __va(x) ((unsigned long)x+PAGE_OFFSET)
> PAGE_OFFSET is a constant. For me, this means that virtual contiguous
> adresses have to be mapped to contiguous physical adresses. Am I wrong
> ?:)
IIRC PAGE_OFFSET is the value added to a physical address to obtain
the address in the *kernel's* identity mapping of physical memory.
The macros above look like they're used to convert between the two.
I don't think they have much directly to do with userspace virtual
addresses, whose mappings to physical memory are obtained via the page
tables.
I'm VM-tarded, though, so the above may be a bunch of hooey.
A good place to start with the Linux VM is probably Mel Gorman's VM
documentation, which although focused on 2.4 should give you a good
start. Which reminds me, I should read this myself.
http://www.skynet.ie/~mel/projects/vm/
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"aart@kvack.org"> aart@kvack.org </a>
prev parent reply other threads:[~2004-06-13 13:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-12 19:02 Tyler
2004-06-13 13:55 ` Sean Neakums [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=6uekoj36lo.fsf@zork.zork.net \
--to=sneakums@zork.net \
--cc=linux-mm@kvack.org \
--cc=tyler@agat.net \
/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