[dpdk-dev] [PATCH 2/4] mem: add API to obstain memory-backed file info

Tan, Jianfeng jianfeng.tan at intel.com
Tue Jan 12 11:48:09 CET 2016


>   But in this case host gets this page size for total region size, therefore qva_to_vva() fails.
>   I haven't worked with hugepages, but i guess that with real hugepages we get one file per page, therefore page size == mapping size. With newly introduced --single-file we now have something that pretends to be a single "uber-huge-page", so we need to specify total size of the mapping here.

Oh I get it and recognize the problem here. The actual problem lies in 
the API rte_eal_get_backfile_info().
backfiles[i].size = hugepage_files[i].size;
Should use statfs or hugepage_files[i].size * hugepage_files[i].repeated 
to calculate the total size.

>   BTW, i'm still unhappy about ABI breakage here. I think we could easily add --shared-mem option, which would simply change mapping mode to SHARED. So, we could use it with both hugepages (default) and plain mmap (with --no-hugepages).

You mean, use "--no-hugepages --shared-mem" together, right?
That makes sense to me.


> Kind regards,
> Pavel Fedin
> Expert Engineer
> Samsung Electronics Research center Russia

More information about the dev mailing list