Some Questions about Kernel Page Table

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

 



Hi all,

In linux-2.6.35.4, the page size of kernel image is 2M, which means that the entity in pmd is PFN pointing to physical page.
For research, I want to change the page size of kernel image to 4K. I modified the content of pmd to make each entity of pmd point to a new page table.
Here is the my related code:
---------------------------------------------------------
 542         pte = alloc_low_page(&pte_phys);   // allocate a new page for page table
 544         last_map_addr = phys_pte_init_remap(pte, address, end, new_prot);  // initiate the entity of new page table
 545         unmap_low_page(pte);
 546 
 547         spin_lock(&init_mm.page_table_lock);
 548         pmd_populate_kernel(&init_mm, pmd, __va(pte_phys));  // modify this pmd entiity, make it point to the address of new page table.
 549  
 550         spin_unlock(&init_mm.page_table_lock);
------------------------------------------------------------------------------------
After adding those code to kernel source, I test the new complied kernel, but the kernel always reboot and can't work. 
Thinking long time, I can't fix where the bug is.
Any suggestions for me?

Thanks,
Lee
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[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