Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-xe] [PATCH 0/4] drm/xe: Implement snapshot support.
@ 2023-10-24 12:22 Maarten, Lankhorst <maarten.lankhorst
  2023-10-24 12:22 ` [Intel-xe] [PATCH 1/4] drm/xe: Add uapi for dumpable bos Maarten, Lankhorst <maarten.lankhorst
                   ` (10 more replies)
  0 siblings, 11 replies; 18+ messages in thread
From: Maarten, Lankhorst <maarten.lankhorst @ 2023-10-24 12:22 UTC (permalink / raw)
  To: intel-xe; +Cc: Maarten Lankhorst

From: Maarten Lankhorst <dev@lankhorst.se>

Hopefully at least the uapi part can be merged. This takes a coredump in
2 steps:
1. On crash, take a snapshot of the VM layout, and a reference to the
bo's to dump.
2. On readout, take a snapshot of each bo to dump and release the
reference.

Because devcoredump is done in signaling context, we can't safely
allocate a lot of memory, or do things like mmap, etc. As such, we have
to wait for readout time to map the BO and copy its contents. This means
that userspace may in the worst case overwrite data after the hang, but
hopefully this is not a serious problem.

Needs more testing..

Maarten Lankhorst (4):
  drm/xe: Add uapi for dumpable bos
  drm/xe: Annotate each dumpable vma as such
  drm/xe: Add vm snapshot mutex for easily taking a vm snapshot during
    devcoredump
  drm/xe: Implement VM snapshot support

 drivers/gpu/drm/xe/xe_devcoredump.c       |   9 ++
 drivers/gpu/drm/xe/xe_devcoredump_types.h |   2 +
 drivers/gpu/drm/xe/xe_vm.c                | 150 ++++++++++++++++++++--
 drivers/gpu/drm/xe/xe_vm.h                |   4 +
 drivers/gpu/drm/xe/xe_vm_types.h          |   8 ++
 include/uapi/drm/xe_drm.h                 |   4 +
 6 files changed, 169 insertions(+), 8 deletions(-)

-- 
2.40.1


^ permalink raw reply	[flat|nested] 18+ messages in thread
* [Intel-xe] [PATCH 0/4] RFC for discussion of devcoredump uapi.
@ 2023-10-13 15:21 maarten.lankhorst
  2023-10-13 15:21 ` [Intel-xe] [PATCH 1/4] drm/xe: Add uapi for dumpable bos maarten.lankhorst
  0 siblings, 1 reply; 18+ messages in thread
From: maarten.lankhorst @ 2023-10-13 15:21 UTC (permalink / raw)
  To: intel-xe; +Cc: Maarten Lankhorst

From: Maarten Lankhorst <dev@lankhorst.se>

I think it makes a lot of sense to dump the BO's for hung processes
later and not from signaling context. This way we can easily grab all
locks required to dump BO state, without having to do anything in an
almost atomic context.

This patch series almost implements the discussed approach, but instead
of actually dumping, it only dumps the contents of a kvmalloc.

vmap dumping needs to be wired up still, but for purposes of discussion
it's nearly complete.

Maarten Lankhorst (4):
  drm/xe: Add uapi for dumpable bos
  drm/xe: Annotate each dumpable vma as such
  drm/xe: Add vm snapshot mutex for easily taking a vm snapshot during
    devcoredump
  drm/xe: Almost implement snapshot support

 drivers/gpu/drm/xe/xe_bo.c                |   4 +
 drivers/gpu/drm/xe/xe_bo.h                |   1 +
 drivers/gpu/drm/xe/xe_devcoredump.c       |   9 ++
 drivers/gpu/drm/xe/xe_devcoredump_types.h |   2 +
 drivers/gpu/drm/xe/xe_vm.c                | 140 ++++++++++++++++++++--
 drivers/gpu/drm/xe/xe_vm.h                |   4 +
 drivers/gpu/drm/xe/xe_vm_types.h          |   8 ++
 include/uapi/drm/xe_drm.h                 |  25 ++++
 8 files changed, 185 insertions(+), 8 deletions(-)

-- 
2.40.1


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2024-01-22 18:03 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-24 12:22 [Intel-xe] [PATCH 0/4] drm/xe: Implement snapshot support Maarten, Lankhorst <maarten.lankhorst
2023-10-24 12:22 ` [Intel-xe] [PATCH 1/4] drm/xe: Add uapi for dumpable bos Maarten, Lankhorst <maarten.lankhorst
2023-11-13 21:41   ` Souza, Jose
2023-10-24 12:22 ` [Intel-xe] [PATCH 2/4] drm/xe: Annotate each dumpable vma as such Maarten, Lankhorst <maarten.lankhorst
2023-10-24 12:22 ` [Intel-xe] [PATCH 3/4] drm/xe: Add vm snapshot mutex for easily taking a vm snapshot during devcoredump Maarten, Lankhorst <maarten.lankhorst
2023-10-24 12:22 ` [Intel-xe] [PATCH 4/4] drm/xe: Implement VM snapshot support Maarten, Lankhorst <maarten.lankhorst
2023-10-27 12:17   ` Thomas Hellström
2023-10-27 17:47     ` Maarten Lankhorst
2023-11-13 21:52   ` Souza, Jose
2024-01-22 18:03   ` Souza, Jose
2023-10-24 13:07 ` [Intel-xe] ✓ CI.Patch_applied: success for drm/xe: Implement " Patchwork
2023-10-24 13:07 ` [Intel-xe] ✗ CI.checkpatch: warning " Patchwork
2023-10-24 13:09 ` [Intel-xe] ✓ CI.KUnit: success " Patchwork
2023-10-24 13:16 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-10-24 13:16 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-10-24 13:18 ` [Intel-xe] ✓ CI.checksparse: " Patchwork
2023-10-24 13:52 ` [Intel-xe] ✓ CI.BAT: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2023-10-13 15:21 [Intel-xe] [PATCH 0/4] RFC for discussion of devcoredump uapi maarten.lankhorst
2023-10-13 15:21 ` [Intel-xe] [PATCH 1/4] drm/xe: Add uapi for dumpable bos maarten.lankhorst

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox