HUGEPAGE support in binutils/linux
John Reiser
jreiser@bitwagon.com
Tue Apr 20 23:25:00 GMT 2010
> I want to load a program text with large pages (on intel nehalem), ...
If "load a program" means the system call execve(), then you must convince
the operating system kernel. Linux execve() does not support large pages.
Patching the kernel to provide such support probably takes a year or more.
If "load a program" means dlopen(), then you must convince rtld, which is
part of glibc. Current glibc provides no direct support for large pages.
Large page support is not part of any official Standard, so getting it
into glibc probably takes a many many years.
The soonest way to accomplish your goal is to use a "pre-loader"
such as used by the Wine project http://www.winehq.org .
The code in loader/preloader.c simulates a "user-mode execve()."
Wine uses its preloader to enforce preferred address ranges.
You can modify the preloader to prefer large pages instead.
Another user-mode execve() is http://BitWagon.com/rtldi/rtldi.html .
--
More information about the Binutils
mailing list