linker script for non-4k page size
hi,
I come across a problem when trying to use 16k page size for 2.6.14
linux/mips kernel: arch/mips/kernel/vmlinux.lds.S align some sections with hardcoded ". = ALIGN(4096)".
This will lead to problem if non-4k page size is used. For example,
if the .init section is put at a page 4k-aligned but not 16k-aligned, free_initmem will free more spaces than it should do, and strange problems will occur.
Should we change to alignment according to CONFIG_PAGE_SIZE_XX? or
just set it to largest possible value(this may cause size increasement?)
BTW: except this problem, 2.6.14 with 16k page size runs well on my machine. According to our experiences of 2.4 kernels, 16k page size has a bit benefit over 4k page size(average 6% improvement for spec cpu2000 int).
But to use 16k kernel, we have to convert binaries of debian/mips:
their sections are often not 16k aligned untill the latest testing branch.
Quoted 15 lines · Fuxin Zhang
hi,
I come across a problem when trying to use 16k page size for 2.6.14
linux/mips kernel:arch/mips/kernel/vmlinux.lds.Salign some sections with hardcoded ". = ALIGN(4096)".
This will lead to problem if non-4k page size is used. For example,
if the .init section is put at a page 4k-aligned but not 16k-aligned,free_initmemwill free more spaces than it should do, and strange problems will occur.
Should we change to alignment according toCONFIG_PAGE_SIZE_XX? or
just set it to largest possible value(this may cause size increasement?)
Quoted 6 lines · Fuxin Zhang
BTW: except this problem, 2.6.14 with 16k page size runs well on my machine. According to our experiences of 2.4 kernels, 16k page size has a bit benefit over 4k page size(average 6% improvement for spec cpu2000 int).
But to use 16k kernel, we have to convert binaries of debian/mips:
their sections are often not 16k aligned untill the latest testing branch.
AFAIR a 64k alignment between code and data segments was introduced in debian shortly before the sarge release, but no attempt to systematically rebuild with that toolchain was made (because debian sarge supports only 4k paged kernels). A rebuild of the respective sarge packages should be enough to work around the problem.
Thiemo
Quoted 6 lines · Thiemo Seufer
AFAIR a 64k alignment between code and data segments was introduced in debian shortly before the sarge release, but no attempt to systematically rebuild with that toolchain was made (because debian sarge supports only 4k paged kernels). A rebuild of the respective sarge packages should be enough to work around the problem.
Rebuild is too much work:), I just wrote some scripts to convert all the debian packages: extract the files, convert the binaries, and repack.
If anyone is interested, I can provide the scripts(and the resulting 16k-enable sarge mipsel isos), though he has to wait some days before I go back to lab.
Quoted 6 lines
Thiemo