[EXT] Re: [PATCH v5 2/2] mem: telemetry support for system memory information
Amit Prakash Shukla
amitprakashs at marvell.com
Tue Oct 11 09:10:32 CEST 2022
Thanks David for the feedback. Please find the proposed fixed inline.
> -----Original Message-----
> From: David Marchand <david.marchand at redhat.com>
> Sent: Saturday, October 8, 2022 1:17 AM
> To: Amit Prakash Shukla <amitprakashs at marvell.com>; Thomas Monjalon
> <thomas at monjalon.net>; Anatoly Burakov <anatoly.burakov at intel.com>;
> dmitry.kozliuk at gmail.com
> Cc: dev at dpdk.org; Jerin Jacob Kollanukkaran <jerinj at marvell.com>;
> bruce.richardson at intel.com; ciara.power at intel.com
> Subject: [EXT] Re: [PATCH v5 2/2] mem: telemetry support for system
> memory information
>
> External Email
>
> ----------------------------------------------------------------------
> On Thu, Sep 29, 2022 at 1:44 PM Amit Prakash Shukla
> <amitprakashs at marvell.com> wrote:
> >
> > Changes adds telemetry support to display system memory information,
> > allocated using calls malloc, calloc, mmap, etc. This patch is based
> > on malloc_info. This patch adds following endpoints:
>
> malloc_info is a GNU extension.
> It is not available in musl and it breaks compilation in Alpine Linux.
> So I can't take this patch.
Shall we limit this for Glibc at compile time ?
+#if defined __GLIBC__ && defined __GLIBC_PREREQ
+#if __GLIBC_PREREQ(2, 10)
/* Gets system memory stat's XML format. */
ret = malloc_info(0, fp);
+#endif
+#else
+ RTE_LOG(DEBUG, EAL, "Error: malloc_info not supported by libc\n");
+ fclose(fp);
+ return -1;
+#endif
I will send out a v6 if the above solution is fine.
>
>
> >
> > 1. /sysmem/sys_heap_list
> > The commands displays the arenas currently in use.
> > Example:
> > --> /sysmem/sys_heap_list
> > {"/sysmem/sys_heap_list": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]}
> >
>
> I am unsure about the command names.
>
> Those commands are really low level and tied to glibc malloc.
> It is unlikely we will have an unified naming with other libc/OS.
>
> I would prefer another pair of eyes, especially on this patch.
> Dmitry, Anatoly?
>
>
> --
> David Marchand
More information about the dev
mailing list