huge pages kernel configuration
I am trying to use large pages to see if there would be any performance improvement for a particular application. I am using libhugetlbfs to re-route malloc() calls to allocate memory using large pages. I see some improvement with 2MB page size (kernels >2.6.16 are configured for 2MB automatically) and would like to try out even larger pages. The documentation included in the library says that other sizes need to be enable during kernel configuration. Does somebody know if there is a limit to the large page size (16MB?, ...) that we can configure the linux kernel? Please share your experiences on using large pages as this would be of great help to me.
Thanks in advance.