Is good to use 4MB pages?
- AlfaOmega08
- Member
- Posts: 226
- Joined: Wed Nov 07, 2007 12:15 pm
- Location: Italy
Is good to use 4MB pages?
If I've 1GB of memory and if I use 4MB pages, I can only have 256 tasks (1024 / 4), if each task takes a page. With 4KB pages, I can have 262144 tasks (1024*1024 / 4), if each task takes a page. So why should I use 4MB page?
- AlfaOmega08
- Member
- Posts: 226
- Joined: Wed Nov 07, 2007 12:15 pm
- Location: Italy
Hi,
A reason stated in the Intel Manuals (sorry - I haven't got time to search and quote) is that there are different TLB entries for large and small pages.
This means that if you store you kernel in a 4M global page and everything else using 4K pages, there's no reason why you should get a TLB miss for your kernel.
Cheers,
Adam
A reason stated in the Intel Manuals (sorry - I haven't got time to search and quote) is that there are different TLB entries for large and small pages.
This means that if you store you kernel in a 4M global page and everything else using 4K pages, there's no reason why you should get a TLB miss for your kernel.
Cheers,
Adam