[ewg] [RFC] libibverbs: ibv_fork_init() and libhugetlbfs

Stefan Roscher ossrosch at linux.vnet.ibm.com
Tue May 18 04:04:05 PDT 2010


Hi Roland,

On Wednesday 12 May 2010 06:40:16 pm Roland Dreier wrote:
>  >  * added get_huge_page_size() to read the huge page size from
>  >    /proc/meminfo. This is done at ibv_fork_init() time.
> 
> That doesn't work on systems that have multiple huge page sizes (eg
> powerpc).  You can compare the code to get the size in libhugetlbfs.
> 
> Also I think the munging through /proc/pid/maps doesn't really work.
> First of all, essentially grepping for libhugetlbfs is not robust as I
> mentioned -- this will break in the same way for apps using huge pages
> directly.  

I agree that this two points (multiple huge page sizes and performance) are two critical
issues which we have to attack.
One suggestion from our side would be to use /proc/pid/smaps which would workaround
the multiple huge page size problem. It would not solve the perfomance issue, because
reading the file would assume long time even if we buffer the ranges and pagesize during 
fork_init.
Do you have an oppinion on that?

We appreciate your help!

regards Stefan

 





More information about the ewg mailing list