RE: memory used by kernel?

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

 



 
Please do not quote on this... I read these thing from a 2.2 kernel
book. 
> 
> As per my knowledge the default page size is 4K .

It is true

> 
> Do you mean to say the ZONE_NORMAL pages are of 4MB
> size ?
>

Yes. Swapper_pg_dir stores ZONE_NORMAL pages as 4MB. There is no page
tables 
For this area. Linux make use of the 4MB page capability of intel
pentium
Processors. There is a flag in the page global directory saying that the
page it points is a 4MB page.
Does any one have a different opition on this ?
 
> I'am aware that kmalloc() should be used for smaller 
> sizes , but would it not be a huge waste & be a cause
> of internal fragmentation if vmalloc() were to
> allocate 4MB pages ?

Vmalloc() allocates 4KB pages only, that is the minimum size and it
could only allocate in multiple of 4K. Vmalloc area is above
ZONE_NORMAL.

While kmalloc() returns an address inside ZONE_NORMAL and the size of
the allocated area is nothing to do with the page size. Does any one
have a different opition on this ?

> 
> Could somebody please confirm .
> 
> Cheers
> 
> 
> 
> 
> 		
> _______________________________
> Do you Yahoo!?
> Declare Yourself - Register online to vote today!
> http://vote.yahoo.com
> 

--
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