RE: memory used by kernel?

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

 



Hi ,

  As per what I know, in 2.4 Kernels the default page
size is 4K .

As per the below link ,   
http://www.skynet.ie/~mel/projects/vm/guide/html/understand/node27.html

Bootstrapping 
....

As the Page Size Extension (PSE) bit is set in the cr4
register, pages translated are 4MiB pages, not 4KiB as
is the normal case.
.....

This shows that 4MB pages are used only during
initialization and after the linux OS is up and 
running the page size of 4K .

Also , refer 

arch/i386/mm/init.c, line 365
include/asm-i386/page.h, line 6 

Do let me know if I'am wrong somewhere .

Cheers

--- Aboo Valappil <aboo@xxxxxxxxxxxxxxx> wrote:

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



		
_______________________________
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