From: Lucas De Marchi <lucas.demarchi@intel.com>
To: <intel-xe@lists.freedesktop.org>
Cc: "Lucas De Marchi" <lucas.demarchi@intel.com>,
"John Harrison" <John.C.Harrison@Intel.com>,
"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
"José Roberto de Souza" <jose.souza@intel.com>
Subject: [PATCH 1/2] drm/xe: Improve devcoredump documentation
Date: Thu, 31 Oct 2024 11:29:15 -0700 [thread overview]
Message-ID: <20241031182916.1441987-2-lucas.demarchi@intel.com> (raw)
In-Reply-To: <20241031182916.1441987-1-lucas.demarchi@intel.com>
Let the introduction be useful for both userspace and kernel. Also
improve the formatting to wire up later to the documentation build.
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
drivers/gpu/drm/xe/xe_devcoredump.c | 40 ++++++++++++++---------------
1 file changed, 19 insertions(+), 21 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_devcoredump.c b/drivers/gpu/drm/xe/xe_devcoredump.c
index d2679c5d976b0..2303557454b16 100644
--- a/drivers/gpu/drm/xe/xe_devcoredump.c
+++ b/drivers/gpu/drm/xe/xe_devcoredump.c
@@ -29,30 +29,28 @@
/**
* DOC: Xe device coredump
*
- * Devices overview:
* Xe uses dev_coredump infrastructure for exposing the crash errors in a
- * standardized way.
- * devcoredump exposes a temporary device under /sys/class/devcoredump/
- * which is linked with our card device directly.
- * The core dump can be accessed either from
- * /sys/class/drm/card<n>/device/devcoredump/ or from
- * /sys/class/devcoredump/devcd<m> where
- * /sys/class/devcoredump/devcd<m>/failing_device is a link to
- * /sys/class/drm/card<n>/device/.
+ * standardized way. Once a crash occurs, devcoredump exposes a temporary
+ * node under ``/sys/class/devcoredump/devcd<m>/``. The same node is also
+ * accessible in ``/sys/class/drm/card<n>/device/devcoredump/``. The
+ * ``failing_device`` symlink points to the device that crashed and created the
+ * coredump.
*
- * Snapshot at hang:
- * The 'data' file is printed with a drm_printer pointer at devcoredump read
- * time. For this reason, we need to take snapshots from when the hang has
- * happened, and not only when the user is reading the file. Otherwise the
- * information is outdated since the resets might have happened in between.
+ * The following characteristics are observed by xe when creating a device
+ * coredump:
*
- * 'First' failure snapshot:
- * In general, the first hang is the most critical one since the following hangs
- * can be a consequence of the initial hang. For this reason we only take the
- * snapshot of the 'first' failure and ignore subsequent calls of this function,
- * at least while the coredump device is alive. Dev_coredump has a delayed work
- * queue that will eventually delete the device and free all the dump
- * information.
+ * **Snapshot at hang**:
+ * The 'data' file contains a snapshot of the HW state at the time the hang
+ * happened. Due to the driver recovering from resets/crashes, it may not
+ * correspond to the state of when the file is read by userspace.
+ *
+ * **First failure only**:
+ * In general, the first hang is the most critical one since the following
+ * hangs can be a consequence of the initial hang. For this reason a snapshot
+ * is taken only for the first failure. Until the devcoredump is released by
+ * userspace or kernel, all subsequent hangs do not override the snapshot nor
+ * create new ones. Devcoredump has a delayed work queue that will eventually
+ * delete the file node and free all the dump information.
*/
#ifdef CONFIG_DEV_COREDUMP
--
2.47.0
next prev parent reply other threads:[~2024-10-31 18:29 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-31 18:29 [PATCH 0/2] drm/xe: devcoredump documentation Lucas De Marchi
2024-10-31 18:29 ` Lucas De Marchi [this message]
2024-11-01 5:47 ` [PATCH 1/2] drm/xe: Improve " Raag Jadav
2024-11-01 12:44 ` Lucas De Marchi
2024-11-01 15:07 ` Raag Jadav
2024-11-01 18:39 ` John Harrison
2024-11-01 19:19 ` Lucas De Marchi
2024-11-01 19:29 ` Lucas De Marchi
2024-11-01 19:59 ` Rodrigo Vivi
2024-11-01 21:17 ` John Harrison
2024-10-31 18:29 ` [PATCH 2/2] drm/xe: Wire up devcoredump in documentation Lucas De Marchi
2024-11-01 14:41 ` Matthew Brost
2024-10-31 19:48 ` ✓ CI.Patch_applied: success for drm/xe: devcoredump documentation Patchwork
2024-10-31 19:48 ` ✗ CI.checkpatch: warning " Patchwork
2024-10-31 19:49 ` ✓ CI.KUnit: success " Patchwork
2024-10-31 20:01 ` ✓ CI.Build: " Patchwork
2024-10-31 20:03 ` ✓ CI.Hooks: " Patchwork
2024-10-31 20:04 ` ✓ CI.checksparse: " Patchwork
2024-10-31 20:29 ` ✓ CI.BAT: " Patchwork
2024-10-31 23:10 ` ✗ CI.FULL: failure " Patchwork
2024-11-01 5:49 ` [PATCH 0/2] " Raag Jadav
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=20241031182916.1441987-2-lucas.demarchi@intel.com \
--to=lucas.demarchi@intel.com \
--cc=John.C.Harrison@Intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=jose.souza@intel.com \
--cc=rodrigo.vivi@intel.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