* Memory management question
@ 2000-03-26 12:06 Rodrigo Fernandez-Vizarra Bonet
0 siblings, 0 replies; 2+ messages in thread
From: Rodrigo Fernandez-Vizarra Bonet @ 2000-03-26 12:06 UTC (permalink / raw)
To: linux-mm@kvack.org
Hi,
I'm developing a linux module and I'm having some trouble with the
memory management in Linux.
Basically, what I want to do is to reserve some physical pages from the
kernel when I install the module (insmod module.o), and when a process
requests them (with mmap), I want to map that pages in the process
virtual memory area.
That's what I'm doing now.
1.- In the kernel I get some physical pages with get_free_page or with
__get_free_page.
2.- I create a device entry en /dev/ called pmm with
module_register_chrdev() with my own version of mmap.
3.- This mmap function uses the function remap_page_range() to map one
of the physical pages into the calling process virtual memory. Of course
the calling process must explicitly call mmap on the new device created
before.
4.- In the kernel space I store some information in that pages.
5.- In the user space process I mmap the device and read from it, but I
can not get the information that I stored there :-(
It's not working, and I can't understand why. When the process makes an
mmap on the device it doesn't complain, but the resulting mapping is not
correct, because I can't access the information that is contained in the
physical page.
If any of you can help me It would be apreciated,
thank you very much in advantage.
Best regards,
Rodrigo
--
Rodrigo Fernandez-Vizarra Bonet
e-mail: rodrigofv@jazzfree.com
You still can avoid the GATES of hell, USE LINUX !!!
--
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.eu.org/Linux-MM/
^ permalink raw reply [flat|nested] 2+ messages in thread* Memoy Management
@ 2005-07-20 13:10 Márcio Oliveira
2005-07-20 13:24 ` Arjan van de Ven
0 siblings, 1 reply; 2+ messages in thread
From: Márcio Oliveira @ 2005-07-20 13:10 UTC (permalink / raw)
To: linux-kernel
Hi all,
Somebody can help me with some memory management issues (like Out Of
Memory) in Linux kernel 2.4 (with some backports from 2.6 kernel. eg.
Red Hat Enterprise Kernel) and SMP machines (4 processors) with a lot of
memory (16GB)?
Thanks a lot.
Márcio.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Memoy Management
2005-07-20 13:10 Memoy Management Márcio Oliveira
@ 2005-07-20 13:24 ` Arjan van de Ven
2005-07-20 14:23 ` Memory Management Márcio Oliveira
0 siblings, 1 reply; 2+ messages in thread
From: Arjan van de Ven @ 2005-07-20 13:24 UTC (permalink / raw)
To: Márcio Oliveira; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 570 bytes --]
On Wed, 2005-07-20 at 10:10 -0300, Márcio Oliveira wrote:
> Hi all,
>
> Somebody can help me with some memory management issues (like Out Of
> Memory) in Linux kernel 2.4 (with some backports from 2.6 kernel. eg.
> Red Hat Enterprise Kernel) and SMP machines (4 processors) with a lot of
> memory (16GB)?
I'm sure RH support will be able to help you with that; I doubt many
other people care about an ancient kernel like that, and a vendor one to
boot.
(Also I assume you are using the -hugemem kernel as the documentation
recommends you to do)
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Memory Management
2005-07-20 13:24 ` Arjan van de Ven
@ 2005-07-20 14:23 ` Márcio Oliveira
2005-07-20 17:03 ` Memory Management Question Márcio Oliveira
0 siblings, 1 reply; 2+ messages in thread
From: Márcio Oliveira @ 2005-07-20 14:23 UTC (permalink / raw)
To: arjanv; +Cc: linux-kernel
Arjan van de Ven wrote:
>I'm sure RH support will be able to help you with that; I doubt many
>other people care about an ancient kernel like that, and a vendor one to
>boot.
>
>(Also I assume you are using the -hugemem kernel as the documentation
>recommends you to do)
>
>
>
Arjan,
I'd like to know/understand more about memory management on Linux
Kernel and I belive this concept is applyable to the Red Hat Linux Kernel.
I have some doubts about the ZONE divison (DMA, NORMAL, HIGHMEM),
Shared Memory utilization, HugeTLB feature and OOM with large memory and
the kernel management of memory on SMP machines. I believe these
features are common to the Linux kernel in general(Red Hat, Debian,
SuSe, kernel.org), right?
I read a tons of docs regarding symposiums, The Linux Memory
Management Book and lots of docs about Oracle memory management but
memory management still not clear to me.
If somebody can help me...
Thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-07-20 17:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-03-26 12:06 Memory management question Rodrigo Fernandez-Vizarra Bonet
-- strict thread matches above, loose matches on Subject: below --
2005-07-20 13:10 Memoy Management Márcio Oliveira
2005-07-20 13:24 ` Arjan van de Ven
2005-07-20 14:23 ` Memory Management Márcio Oliveira
2005-07-20 17:03 ` Memory Management Question Márcio Oliveira
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.