Skip to contentSkip to conversation

Unlinking hugepage backing file after initialiation

DISCUSSION shesha Sreenivasamurthy (shesha) 1 participant 1 message Sep 29, 2015

lore
Share & tools
lore
#0 lore raw

Additional info:

Before staring Application:
-------------------------------------
cat /sys/devices/system/node/node*/meminfo | grep HugePages_

Node 0 HugePages_Total:  2048
Node 0 HugePages_Free:   2048
Node 0 HugePages_Surp:      0
Node 1 HugePages_Total:  2048
Node 1 HugePages_Free:   2048
Node 1 HugePages_Surp:      0

While application is running:
-------------------------------------
cat /sys/devices/system/node/node*/meminfo | grep HugePages_

Node 0 HugePages_Total:  2048
Node 0 HugePages_Free:   1536
Node 0 HugePages_Surp:      0
Node 1 HugePages_Total:  2048
Node 1 HugePages_Free:   1536
Node 1 HugePages_Surp:      0

After Application is stopped:
-------------------------------------
cat /sys/devices/system/node/node*/meminfo | grep HugePages_

Node 0 HugePages_Total:  2048
Node 0 HugePages_Free:   1536
Node 0 HugePages_Surp:      0
Node 1 HugePages_Total:  2048
Node 1 HugePages_Free:   1536
Node 1 HugePages_Surp:      0

With UNLINKING in eal_memory.c::rte_eal_hugepage_init() and after application is stopped:
------------------------------------------------------------
cat /sys/devices/system/node/node*/meminfo | grep HugePages_

Node 0 HugePages_Total:  2048
Node 0 HugePages_Free:   2048
Node 0 HugePages_Surp:      0
Node 1 HugePages_Total:  2048
Node 1 HugePages_Free:   2048
Node 1 HugePages_Surp:      0

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

From: dev <[email protected]<mailto:[email protected]>> on behalf of Cisco Employee <[email protected]<mailto:[email protected]>>
Date: Monday, September 28, 2015 at 5:04 PM
To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
Subject: [dpdk-dev] Unlinking hugepage backing file after initialiation

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.

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