Re: maximum kernel addres space and its implication to user space memory allocation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mulyadi,

On 1/20/06, Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx> wrote:
>
<snip>
>
> Now let's assume we have a PC with 1GB RAM and we disable highmem
> support in currently running Linux kernel. Also assume there is still
> around 900 MB free RAM available to be used (it's currently consumed by
> kernel code and data, also several user space daemons)
>
> When a task is keep allocating memory (and the page frames are really
> allocated, so it's not just a matter of extending the size of existing
> VMA region such as heap) and it reaches 896 MB mark, can it keep asking
> for more RAM?
>

I think yes, because as I read in linux-kernel mailing-list thread
somedays ago (thread subject is: Question on the current behaviour of
malloc () on Linux) that user space can be able to allocate more
memory then available currently on the system as it is considered that
user space application won't be using all the memory at the same time
and keeping the not-in-use pages in swap space and this is I think
called as memory overcommitting. AFAIR this behaviour of allowing more
memory then physically available to user space can be
changed/controlled through proc/sys/vm/overcommit_memory (for more
detail see the thread) ....

> My understanding so far is: user space memory allocation is satisfied by
> using free pages from ZONE_NORMAL pool. Since ZONE_NORMAL is ranging
> from 16 MB to 896 MB, once it is all used, kernel memory allocator will
> start looking in ZONE_HIGHMEM. But since we disable highmem support,
> ZONE_HIGHMEM isn't exist. Therefore, the kernel can't satisfy user
> space request beyond 896 MB, thus it failed. My other understanding is,
> 128 MB of RAM is simply wasted since it can't be addressed
>

Yes, 128MB is wasted due to not usage of HIGHMEM :) but kernel can
satisfy the request of more memory as i mentioned above ! (CMIIW)

> I will greatly appreciate if somebody can give explanations about this
> issue. I had tried to read Understanding The Linux Kernel 2nd ed but I
> still can't understand it completely
>

I hope I explained what you are actually looking for :)

--
Fawad Lateef

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux