Thread (196 messages) 196 messages, 20 authors, 2016-06-24

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

From: Tan, Jianfeng <hidden>
Date: 2016-01-12 10:48:13

Hello!
  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.

Thanks,
Jianfeng
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help