DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] Unlinking hugepage backing file after initialiation
@ 2015-09-29  0:04 shesha Sreenivasamurthy (shesha)
  2015-09-29  2:37 ` Xie, Huawei
  2015-09-29  9:03 ` Ananyev, Konstantin
  0 siblings, 2 replies; 18+ messages in thread
From: shesha Sreenivasamurthy (shesha) @ 2015-09-29  0:04 UTC (permalink / raw)
  To: dev

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; }

^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: [dpdk-dev] Unlinking hugepage backing file after initialiation
@ 2015-09-29  0:24 shesha Sreenivasamurthy (shesha)
  0 siblings, 0 replies; 18+ messages in thread
From: shesha Sreenivasamurthy (shesha) @ 2015-09-29  0:24 UTC (permalink / raw)
  To: shesha Sreenivasamurthy (shesha), dev

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 <dev-bounces@dpdk.org<mailto:dev-bounces@dpdk.org>> on behalf of Cisco Employee <shesha@cisco.com<mailto:shesha@cisco.com>>
Date: Monday, September 28, 2015 at 5:04 PM
To: "dev@dpdk.org<mailto:dev@dpdk.org>" <dev@dpdk.org<mailto:dev@dpdk.org>>
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; }

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2015-10-12  8:46 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-29  0:04 [dpdk-dev] Unlinking hugepage backing file after initialiation shesha Sreenivasamurthy (shesha)
2015-09-29  2:37 ` Xie, Huawei
2015-09-29 15:15   ` Xie, Huawei
2015-09-29 15:48     ` shesha Sreenivasamurthy (shesha)
2015-09-29 16:16       ` Michael S. Tsirkin
2015-09-29 17:50         ` shesha Sreenivasamurthy (shesha)
2015-09-29 21:35           ` Michael S. Tsirkin
2015-09-30 21:44             ` shesha Sreenivasamurthy (shesha)
2015-09-30 21:53               ` Ananyev, Konstantin
2015-09-30 22:04                 ` shesha Sreenivasamurthy (shesha)
2015-10-01  8:41                   ` Bruce Richardson
2015-10-05 13:08             ` Xie, Huawei
2015-10-05 20:20               ` Michael S. Tsirkin
2015-10-12  8:46                 ` Xie, Huawei
2015-09-29  9:03 ` Ananyev, Konstantin
2015-09-29 11:14   ` Bruce Richardson
2015-09-29 14:03     ` shesha Sreenivasamurthy (shesha)
2015-09-29  0:24 shesha Sreenivasamurthy (shesha)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).