Re: [PATCH 2/4] mem: add API to obstain memory-backed file info
From: Sergio Gonzalez Monroy <hidden>
Date: 2016-01-12 11:33:06
From: Sergio Gonzalez Monroy <hidden>
Date: 2016-01-12 11:33:06
On 12/01/2016 11:22, Pavel Fedin wrote:
Hello!quoted
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..repeated depends on CONFIG_RTE_EAL_SIGLE_FILE_SEGMENTS. By the way, looks like it does the same thing as you are trying to do with --single-file, but with hugepages, doesn't it? I see it's currently used by ivshmem (which is AFAIK very immature and half-abandoned).
Similar but not the same. --single-file: a single file for all mapped hugepages. SINGLE_FILE_SEGMENTS: a file per set of physically contiguous mapped hugepages (what DPDK calls memseg , memory segment). So there could be more than one file. Sergio
Or should we just move .repeated out of the #ifdef ? Kind regards, Pavel Fedin Senior Engineer Samsung Electronics Research center Russia