From: Lewis Donzis <lew@perftech.com>
To: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Cc: dev <dev@dpdk.org>
Subject: Re: Including contigmem in core dumps
Date: Tue, 28 May 2024 08:19:22 -0500 (CDT) [thread overview]
Message-ID: <936080190.226277.1716902362160.JavaMail.zimbra@donzis.com> (raw)
In-Reply-To: <20240528095503.7556d91e@sovereign>
----- On May 28, 2024, at 1:55 AM, Dmitry Kozlyuk dmitry.kozliuk@gmail.com wrote:
> Hi Lewis,
>
> Memory reserved by eal_get_virtual_area() is not yet useful,
> but it is very large, so by excluding it from dumps,
> DPDK prevents dumps from including large zero-filled parts.
>
> It also makes sense to call eal_mem_set_dump(..., false)
> from eal_memalloc.c:free_seg(), because of --huge-unlink=never:
> in this mode (Linux-only), freed segments are not cleared,
> so if they were included into dump, it would be a lot of garbage data.
>
> Newly allocated hugepages are not included into dumps
> because this would make dumps very large by default.
> However, this could be an opt-in as a runtime option if need be.
Thanks for the clarification. I agree that not including freed segments makes perfect sense.
But when debugging a core dump, it's sometimes really helpful to be able to see what's in the mbuf that was being processed at the time. Perhaps it would be a useful option to be able to tell the allocator not to disable core dumps.
In the mean time, my experiments to get around this have not been fruitful.
I wondered if we could enable core dumps for mbufs by calling rte_mempool_mem_iter() on the pool returned by rte_pktmbuf_pool_create(), and have the callback function call madvise(memhdr->addr, memhdr->len, MADV_CORE). But that didn't help, or at least the size of the core file didn't increase.
I then tried disabling the call to madvise() in the DPDK source code, and that didn't make any difference either.
Note that this is on FreeBSD, so I wonder if there's some fundamental reason that the contigmem memory doesn't get included in a core dump?
prev parent reply other threads:[~2024-05-28 13:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-28 0:34 Lewis Donzis
2024-05-28 6:55 ` Dmitry Kozlyuk
2024-05-28 13:19 ` Lewis Donzis [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=936080190.226277.1716902362160.JavaMail.zimbra@donzis.com \
--to=lew@perftech.com \
--cc=dev@dpdk.org \
--cc=dmitry.kozliuk@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).