DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: dev@dpdk.org
Cc: Anatoly Burakov <anatoly.burakov@intel.com>,
	Lewis Donzis <lew@perftech.com>,
	Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Subject: [PATCH v2 2/2] doc: add instruction for including hugepages in core dump
Date: Fri, 25 Oct 2024 23:26:15 +0300	[thread overview]
Message-ID: <20241025202615.2581513-3-dmitry.kozliuk@gmail.com> (raw)
In-Reply-To: <20241025202615.2581513-1-dmitry.kozliuk@gmail.com>

Linux excludes hugepages from core dump by default.
Describe the means to override this behavior
as well as implications of doing so.
Only mapped hugepages will be included in core dump,
because Linux EAL explicitly excludes reserved regions.

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
---
 doc/guides/linux_gsg/build_sample_apps.rst | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/doc/guides/linux_gsg/build_sample_apps.rst b/doc/guides/linux_gsg/build_sample_apps.rst
index 4f99617233..86d8712e69 100644
--- a/doc/guides/linux_gsg/build_sample_apps.rst
+++ b/doc/guides/linux_gsg/build_sample_apps.rst
@@ -180,6 +180,24 @@ Similarly, on a four socket system, to allocate 1 GB memory on each of sockets 0
 No memory will be reserved on any CPU socket that is not explicitly referenced, for example, socket 3 in this case.
 If the DPDK cannot allocate enough memory on each socket, the EAL initialization fails.
 
+Whether hugepages are included in core dump is controlled by ``/proc/<pid>/coredump_filter``.
+It is ``33`` (hexadecimal) by default, which means that hugepages are exclued from core dump.
+This setting is per-process and is inherited.  Refer to ``core(5)`` for details.
+To include mapped hugepages in core dump, set bit 6 (``0x40``) in the parent process or shell
+before running a DPDK application:
+
+.. code-block:: shell
+
+    echo 0x73 > /proc/self/coredump_filter
+    ./rte-app ...
+
+.. note::
+
+    Including hugepages in core dump file increases its size,
+    which may fill the storage or overload the transport.
+    Hugepages typically hold data processed by the application,
+    like network packets, which may contain sensitive information.
+
 Additional Sample Applications
 ------------------------------
 
-- 
2.38.4


      parent reply	other threads:[~2024-10-25 20:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-23 23:18 [PATCH] eal: support including mapped memory " Dmitry Kozlyuk
2024-10-24  2:19 ` Stephen Hemminger
2024-10-24  2:31 ` Stephen Hemminger
2024-10-24  7:07   ` Morten Brørup
2024-10-24  7:22 ` Morten Brørup
2024-10-24  8:25   ` Dmitry Kozlyuk
2024-10-24 12:55 ` Lewis Donzis
2024-10-24 16:38 ` Stephen Hemminger
2024-10-24 20:54   ` Dmitry Kozlyuk
2024-10-25  0:22     ` Dmitry Kozlyuk
2024-10-25 20:26 ` [PATCH v2 0/2] Hugepage inclusion " Dmitry Kozlyuk
2024-10-25 20:26   ` [PATCH v2 1/2] contigmem: support including mapped buffers " Dmitry Kozlyuk
2024-10-25 20:26   ` Dmitry Kozlyuk [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=20241025202615.2581513-3-dmitry.kozliuk@gmail.com \
    --to=dmitry.kozliuk@gmail.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=lew@perftech.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).