Re: dynamic page size on linux

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

 



On 9/14/06, Vin <pane.vinayak@xxxxxxxxx> wrote:
Hi,

>
> For eg. if the page size is 4kb and the file size is 13kb then it will
> consume 4 pages with the last page using only 1 kb of its 4kb.
>
> So can we have some mechanism to utilize the wasted memory..
>
> Can we use dynamic size for the last page so that the memory is not wasted?

Page size is architecture dependent.
1. We cant have page sizes something other than what architecture offers.

True

2.AFAIK, architectures doesn't support variable PAGE_SIZE once the
system has started . I mean to say, if we chose 4kb then we are avail
with 4k size only, not 4MB.

Multiple page sizes CAN and ARE supported after system startup also.
On the x86 line of processors, with PSE, we can have 4K, 4M pages at
the same time. AFAIK the kernel code segment is stored in two 4MB
pages. If you are using PAE, you can have pages of size 2 MB.

3. Does the MMU recognises such dynamic sizes ?

It does. If you look at the page table layout on x86, you will
understand how this is supported, better. However there exist separate
TLB caches for both 4K & 4M pages.


./v

Bhanu.


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




--
I look to the future because that's where I'm going to spend the rest
of my life.

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