* [PATCH] eal/linux: enable the hugepage mem dump
@ 2022-03-08 9:41 Li Feng
2022-03-31 14:46 ` Burakov, Anatoly
0 siblings, 1 reply; 3+ messages in thread
From: Li Feng @ 2022-03-08 9:41 UTC (permalink / raw)
To: Anatoly Burakov; +Cc: dev, Li Feng
These hugepages include important structures. We should dump these
hugepages into a coredump file for debugging when generating a coredump.
Signed-off-by: Li Feng <fengli@smartx.com>
---
lib/eal/linux/eal_memalloc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/eal/linux/eal_memalloc.c b/lib/eal/linux/eal_memalloc.c
index f8b1588cae..d7c2eb14a1 100644
--- a/lib/eal/linux/eal_memalloc.c
+++ b/lib/eal/linux/eal_memalloc.c
@@ -623,6 +623,8 @@ alloc_seg(struct rte_memseg *ms, void *addr, int socket_id,
goto resized;
}
+ eal_mem_set_dump(va, alloc_sz, true);
+
/* In linux, hugetlb limitations, like cgroup, are
* enforced at fault time instead of mmap(), even
* with the option of MAP_POPULATE. Kernel will send
--
2.35.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] eal/linux: enable the hugepage mem dump
2022-03-08 9:41 [PATCH] eal/linux: enable the hugepage mem dump Li Feng
@ 2022-03-31 14:46 ` Burakov, Anatoly
2022-04-01 9:11 ` Li Feng
0 siblings, 1 reply; 3+ messages in thread
From: Burakov, Anatoly @ 2022-03-31 14:46 UTC (permalink / raw)
To: Li Feng; +Cc: dev
On 08-Mar-22 9:41 AM, Li Feng wrote:
> These hugepages include important structures. We should dump these
> hugepages into a coredump file for debugging when generating a coredump.
>
> Signed-off-by: Li Feng <fengli@smartx.com>
> ---
> lib/eal/linux/eal_memalloc.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/lib/eal/linux/eal_memalloc.c b/lib/eal/linux/eal_memalloc.c
> index f8b1588cae..d7c2eb14a1 100644
> --- a/lib/eal/linux/eal_memalloc.c
> +++ b/lib/eal/linux/eal_memalloc.c
> @@ -623,6 +623,8 @@ alloc_seg(struct rte_memseg *ms, void *addr, int socket_id,
> goto resized;
> }
>
> + eal_mem_set_dump(va, alloc_sz, true);
> +
> /* In linux, hugetlb limitations, like cgroup, are
> * enforced at fault time instead of mmap(), even
> * with the option of MAP_POPULATE. Kernel will send
I am amicable to the idea of including allocated hugepage data in core
dumps, but even with that assumption, i think you're setting the dump
flag a little too early, and never cleanup if something fails down the line.
Perhaps move this to the very end of the function, after we have
succeeded in creating a new segment?
--
Thanks,
Anatoly
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] eal/linux: enable the hugepage mem dump
2022-03-31 14:46 ` Burakov, Anatoly
@ 2022-04-01 9:11 ` Li Feng
0 siblings, 0 replies; 3+ messages in thread
From: Li Feng @ 2022-04-01 9:11 UTC (permalink / raw)
To: Burakov, Anatoly; +Cc: dev
On Thu, Mar 31, 2022 at 10:47 PM Burakov, Anatoly
<anatoly.burakov@intel.com> wrote:
>
> On 08-Mar-22 9:41 AM, Li Feng wrote:
> > These hugepages include important structures. We should dump these
> > hugepages into a coredump file for debugging when generating a coredump.
> >
> > Signed-off-by: Li Feng <fengli@smartx.com>
> > ---
> > lib/eal/linux/eal_memalloc.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/lib/eal/linux/eal_memalloc.c b/lib/eal/linux/eal_memalloc.c
> > index f8b1588cae..d7c2eb14a1 100644
> > --- a/lib/eal/linux/eal_memalloc.c
> > +++ b/lib/eal/linux/eal_memalloc.c
> > @@ -623,6 +623,8 @@ alloc_seg(struct rte_memseg *ms, void *addr, int socket_id,
> > goto resized;
> > }
> >
> > + eal_mem_set_dump(va, alloc_sz, true);
> > +
> > /* In linux, hugetlb limitations, like cgroup, are
> > * enforced at fault time instead of mmap(), even
> > * with the option of MAP_POPULATE. Kernel will send
>
> I am amicable to the idea of including allocated hugepage data in core
> dumps, but even with that assumption, i think you're setting the dump
> flag a little too early, and never cleanup if something fails down the line.
>
> Perhaps move this to the very end of the function, after we have
> succeeded in creating a new segment?
Done in the v2, thanks.
>
> --
> Thanks,
> Anatoly
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-04-01 9:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-08 9:41 [PATCH] eal/linux: enable the hugepage mem dump Li Feng
2022-03-31 14:46 ` Burakov, Anatoly
2022-04-01 9:11 ` Li Feng
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).