[dpdk-dev] Unlinking hugepage backing file after initialiation

Xie, Huawei huawei.xie at intel.com
Tue Sep 29 17:15:42 CEST 2015


On 9/29/2015 10:38 AM, Xie, Huawei wrote:
> On 9/29/2015 8:04 AM, shesha Sreenivasamurthy (shesha) wrote:
>> Hello,
>> As of DPDK2.1, backing files are created in hugetablefs during mapping (in eal_memory.c::rte_eal_hugepage_init()) and these files are not cleaned up (unlinked) after initialization (mmap-ing). This means, when the application crashes or stopped, the memory is still consumed. Therefore, is there any reason not to unlink backing files after initialization ? If no, I will send a patch for the change.
> shesha:
> You remind me the virtio unexpected crashing issue. DPDK runs in user
> space. It is quite possible it dies unexpectedly, either crash or being
> killed.
> When the dpdk virtio app crashes, it doesn't have a chance to notify
> host, so host is still using its memory, backed by guest huge page.
> If huge page files are still reserved in hugetlbfs, we have a chance to
> recover virtio first, then unlink the huge pages.
> Otherwise if the huge pages are allocated by other process, its memory
> could be corrupted by host.
>
> Certainly it is not implemented like that for this purpose, but i think
> it is a temporary solution for this user space virtio driver issue.

I realized it is not a virtio specific issue, but apply to all user
space driver.
And the chance is very very small.

Also commented by Bruce/Konstantin, it is implemented this way for
multiple processes.

>
> /huawei
>  
>
>
>
>
>
>> --
>> - Thanks
>> char * (*shesha) (uint64_t cache, uint8_t F00D)
>> { return 0x0000C0DE; }
>>
>



More information about the dev mailing list