* GFP_KERNEL doubt!! <was Tasklet doubt!>
@ 2003-04-11 20:22 Sriram Narasimhan
0 siblings, 0 replies; only message in thread
From: Sriram Narasimhan @ 2003-04-11 20:22 UTC (permalink / raw)
To: linux-kernel
Hello,
The problem of allocating more than 2.5 MB was actually more or less
related to the physical memory left in the kernel.
But I moved the task which allocated the memory from the tasklet to the
keventd and used kmalloc (GFP_KERNEL).
The first time I ran my module, it failed at the same 2.5 MB limit.
I restarted the system and tried it again, and I was able to allocate 5
MB successfully.
I restarted the system and ran "free".
The report is as follows:
total used free shared buffers cached
Mem: 62264 30624 31640 0 8072 16096
-/+ buffers/cache: 6456 55808
Swap: 192772 0 192772
Then I ran gcc and compiled my code and then for the "free" report again.
The report is as follows:
total used free shared buffers cached
Mem: 62264 45320 16944 0 9256 28384
-/+ buffers/cache: 7680 54584
Swap: 192772 0 192772
I was able to notice that the physical memory had gone down though "gcc"
had completed.
The time I ran my application, I had about 2.5M physical memory left, so
I was able to allocate 2.5M.
What is happening ? What is the buffers/cache column and is there any
way I could force the kernel to release the cached memory back to free
physical ?
Is there any way I can allocate more than what is left free from the
physical memory ?
Any pointers or suggestions would be very helpful.
Thank you.
Regards,
Sriram
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-04-11 20:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-11 20:22 GFP_KERNEL doubt!! <was Tasklet doubt!> Sriram Narasimhan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®