* Memory management questions
@ 2004-06-12 19:02 Tyler
2004-06-13 13:55 ` Sean Neakums
0 siblings, 1 reply; 2+ messages in thread
From: Tyler @ 2004-06-12 19:02 UTC (permalink / raw)
To: linux-mm
Hi all,
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 ?:)
--
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Memory management questions
2004-06-12 19:02 Memory management questions Tyler
@ 2004-06-13 13:55 ` Sean Neakums
0 siblings, 0 replies; 2+ messages in thread
From: Sean Neakums @ 2004-06-13 13:55 UTC (permalink / raw)
To: Tyler; +Cc: linux-mm
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-06-13 13:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-12 19:02 Memory management questions Tyler
2004-06-13 13:55 ` Sean Neakums
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox