On Mon, Aug 24, 2009 at 11:51:07PM +0200, Toon Moene wrote: > [ I found this e-mail address while surfing http://linux-mm.org - > hope it's relevant. ] > > Is it possible to boot the Linux kernel in such a way as to *only* > enable "huge" pages ? > > I ask this because my use of "da machine" is mostly running large > Fortran programs, who need all memory of it anyway, so there's little to > gain from small page sizes.
The kernel portion of the address space is already backed by huge PTEs so you can ignore that. If you have a smaller number of fortran applications that are consuming all of memory, then recompile them to use hugepages as described in the HOWTO. Use hugeadm to get the system to dynamically allocate hugepages where they are available with; hugeadm --pool-pages-max 2M:$((TOTAL_MEMORY_IN_MEGABYTES/2)) and make them available with improved fragmentation control with hugeadm --create-global-mounts hugeadm --set-recommended-min_free_Kbytes and then run your applications hugectl --text --data --heap ./target_application and it'll use hugepages when and where possible. You can do basic monitoring with grep Huge /proc/meminfo You can also use /proc/PID/smaps to get a better view of which portions of your application are really using hugepages by looking at the KernelPageSize: and MMUPageSize: of each address range in use by your application. Caveats o existance of hugeadm depends on your version of libhugetlbfs o --set-recommended-min_free_kbytes is not in a release version yet, just in the source repository o smaps reporting the pagesize in use depends on your kernel version and it's relatively recent > > [ Yes, I know this will make the occasional 'ls', 'rm' and 'mv' also at > least 2 MB in size ] > It's not really possible because there are ABI assumptions about 4K that would make loading normal binaries harder. On some architecture like PPC64, it's less of a problem as binaries are aligned to 64K so those page sizes can be used at least but on x86, a recompile is needed. > Thanks in advance for any insight provided ... and happy hacking ! > Hope this helped. -- Mel Gorman Part-time Phd Student Linux Technology Center University of Limerick IBM Dublin Software Lab ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Libhugetlbfs-devel mailing list Libhugetlbfs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel