From patchwork Thu Jul 13 21:32:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andr=C3=A9_Almeida?= X-Patchwork-Id: 13312656 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3DC01C0015E for ; Thu, 13 Jul 2023 21:33:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DDC0A10E787; Thu, 13 Jul 2023 21:33:21 +0000 (UTC) Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) by gabe.freedesktop.org (Postfix) with ESMTPS id C658410E785; Thu, 13 Jul 2023 21:33:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=XaUH0inLzPLEoGiySyQaMSAIFD67nesdBt9LTsWi9os=; b=J51neSaiPnQHH/bS0IFUW+Oeuv b5McKZXjM7b2Xb1ryUAAeV0Sm5/TtNxf+rxkdvhBfXXVrBQ4eCMIQhx8RDiS+SktRwbsDIfkJFrn2 eenRqX5uuSoh907mpBriWBn/3jiwlUHrBvz5b7O6/IVz2Y+ziAqhebN3BhM6Nbnpx0EjGlSRlSg0S mK4zrf+yo7uPaoHCz+KfqQkwjlaQZVD4frrpLErblDihr6KszESMuQqDkU/0GM7OmbDl6xHS/CqDe QtMsGJy+plTrR+645aHVMRGndzlb+YWAMWFTqtcIXrwPaeG500Ww1yNTXquxkRMMYrWYjWcUyD6lC auhy4+tQ==; Received: from [187.74.70.209] (helo=steammachine.lan) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1qK3w2-00EDEa-MT; Thu, 13 Jul 2023 23:33:15 +0200 From: =?utf-8?q?Andr=C3=A9_Almeida?= To: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/6] drm/amdgpu: Add new reset option and rework coredump Date: Thu, 13 Jul 2023 18:32:36 -0300 Message-ID: <20230713213242.680944-1-andrealmeid@igalia.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pierre-eric.pelloux-prayer@amd.com, =?utf-8?q?Andr=C3=A9_Almeida?= , =?utf-8?b?J01hcmVr?= =?utf-8?b?IE9sxaHDoWsn?= , =?utf-8?q?Timur_Krist=C3=B3f?= , michel.daenzer@mailbox.org, Samuel Pitoiset , kernel-dev@igalia.com, alexander.deucher@amd.com, christian.koenig@amd.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi, The goal of this patchset is to improve debugging device resets on amdgpu. The first patch creates a new module parameter to disable soft recoveries, ensuring every recovery go through the full device reset, making easier to generate resets from userspace tools like [0] and [1]. This is important to validate how the stack behaves on resets, from end-to-end. The last patches are a rework to store more information at devcoredump files, making it more useful to be attached to bug reports. The new coredump content look like this: **** AMDGPU Device Coredump **** version: 1 kernel: 6.4.0-rc7-tony+ module: amdgpu time: 702.743534320 process_name: vulkan-triangle PID: 4561 IBs: [0] 0xffff800100545000 [1] 0xffff800100001000 ring name: gfx_0.0.0 Due to nested IBs, this may not be the one that really caused the hang, but it gives some direction. Thanks, André [0] https://gitlab.freedesktop.org/andrealmeid/gpu-timeout [1] https://github.com/andrealmeid/vulkan-triangle-v1 Changelog: v1: https://lore.kernel.org/dri-devel/20230711213501.526237-1-andrealmeid@igalia.com/ - Drop "Mark contexts guilty for causing soft recoveries" patch - Use GFP_NOWAIT for devcoredump allocation André Almeida (6): drm/amdgpu: Create a module param to disable soft recovery drm/amdgpu: Allocate coredump memory in a nonblocking way drm/amdgpu: Rework coredump to use memory dynamically drm/amdgpu: Limit info in coredump for kernel threads drm/amdgpu: Log IBs and ring name at coredump drm/amdgpu: Create version number for coredumps drivers/gpu/drm/amd/amdgpu/amdgpu.h | 21 +++-- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 99 +++++++++++++++++----- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 9 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 6 +- 4 files changed, 106 insertions(+), 29 deletions(-)