Received: by 2002:a05:7412:bb8d:b0:d7:7d3a:4fe2 with SMTP id js13csp2654671rdb; Fri, 18 Aug 2023 07:00:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFr9/jiNrKD+SYtSV3oL288IDv43atLFaOiLVbGsy0x7bX+xif7WhEjWJtMqAi+rmuiPMXD X-Received: by 2002:a17:907:1de6:b0:99b:c1b7:d806 with SMTP id og38-20020a1709071de600b0099bc1b7d806mr2146005ejc.0.1692367203975; Fri, 18 Aug 2023 07:00:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692367203; cv=none; d=google.com; s=arc-20160816; b=s2AuJoInnQevpbwHyoDNEwyhwUUgnWUc1mQsl2z9CgDky8Mf+XYbOmPNw6RXbAMQ4Z 1hOxxqbsH2+KY8ChdKBswncy0TRxcJZ7Q3f/KUUpZNqEkmTai971LOmdMsQ6H5KOFpNd qbkBwZSY6x5cl+pUmTUe52ZH2ZJtPb2Col8mK87qkVLTuRqDrbcz3mWR45Ob98Qhbd20 0dk2jOKYXM1Bl0BYFEnv5HX+9bgkMFWoH2p3kOmriW/KNU3dc7/sS4k0x6FVEs0CwJyP zPmWgG0ROlyqZYVEInsUcFOzHiybh+yd+Y5KSB9mC9T7Bbqq0RwNUxW0UUTw2KJ0aq79 ol9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0So8O3/MNtUi08+iM0GTq8USjRthw2+S2AnIdqjvHuo=; fh=4drWZfXh6M/zU5TbzJpAHkpGJffjB2tpWVKmXKr8SAQ=; b=vfw+7sEtDek5p8kAm16mPFjzLWhGNmIfMILXqRg9NjvuSizDH4rHmy0i+sNKFtyHZY PWuJcZF9D+WrI4RTMZHr2YfV2l0EMwCBhJc57vQ3r0V1/UesRCTgtVXDv4ExzGxIWs3k DahZdRcBjk8oGxgUZA7c7e1PjnkcQWMYVYUWiMxwc1G7MKGQA/wBSDtMElnz6YgAHFOj wUXW2mg4eI872RHFzL7dEpsKP7llbKZLvsSBxLxZNd560GuT48qLv0+0Vq6dbsNZJSIR usvRmu6c3eZ4saR1DRUIVnlU+XpsX2MCPtBt25Vh5tfogE0CX7FngQ9uECasVgpiAV9i KAdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=q2glmrup; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y21-20020a1709060a9500b0099d79342678si1303594ejf.40.2023.08.18.06.59.39; Fri, 18 Aug 2023 07:00:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b=q2glmrup; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240074AbjHOTwJ (ORCPT + 99 others); Tue, 15 Aug 2023 15:52:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240144AbjHOTva (ORCPT ); Tue, 15 Aug 2023 15:51:30 -0400 Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDFC51BD1 for ; Tue, 15 Aug 2023 12:51:26 -0700 (PDT) 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:References: In-Reply-To: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:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=0So8O3/MNtUi08+iM0GTq8USjRthw2+S2AnIdqjvHuo=; b=q2glmrupVK+JIYupjkCpk8dXgr bFE/kRAqwwmDJPardd9qkvhQD9bdp4ZybFG3M8ZJErKyZhYuXf1Nr4hnGNwkwpzauTNzq4+JexPA4 xqJgISPfNLAhJK+9zjxaSVPP1A7TTuHXPTefAE/Lw6yHrWPSGJVOvggl8f+mnd3Z6VgLq+29qcUVt pTRZ9trsck8W5vrKHXYW0K06pDzhSSJScSiGazYOjCq3QYC6ypez9ZiU2yoYWca1zfhrlWa9ufu4O BI7VbPX+C2rI4qRCawUAYqP2hUH+vQ2gvE3CDmLf59hPa2tGZvxIXqM++u9nCj6itWRAxaccuW6D/ 6dU7+AWg==; Received: from [191.193.179.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 1qW04a-001DUX-DG; Tue, 15 Aug 2023 21:51:24 +0200 From: =?UTF-8?q?Andr=C3=A9=20Almeida?= To: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: kernel-dev@igalia.com, alexander.deucher@amd.com, christian.koenig@amd.com, pierre-eric.pelloux-prayer@amd.com, =?UTF-8?q?=27Marek=20Ol=C5=A1=C3=A1k=27?= , Samuel Pitoiset , Bas Nieuwenhuizen , =?UTF-8?q?Timur=20Krist=C3=B3f?= , =?UTF-8?q?Andr=C3=A9=20Almeida?= Subject: [PATCH v4 1/4] drm/amdgpu: Allocate coredump memory in a nonblocking way Date: Tue, 15 Aug 2023 16:50:57 -0300 Message-ID: <20230815195100.294458-2-andrealmeid@igalia.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230815195100.294458-1-andrealmeid@igalia.com> References: <20230815195100.294458-1-andrealmeid@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org During a GPU reset, a normal memory reclaim could block to reclaim memory. Giving that coredump is a best effort mechanism, it shouldn't disturb the reset path. Change its memory allocation flag to a nonblocking one. Signed-off-by: André Almeida Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index aa171db68639..bf4781551f88 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -4847,7 +4847,7 @@ static void amdgpu_reset_capture_coredumpm(struct amdgpu_device *adev) struct drm_device *dev = adev_to_drm(adev); ktime_get_ts64(&adev->reset_time); - dev_coredumpm(dev->dev, THIS_MODULE, adev, 0, GFP_KERNEL, + dev_coredumpm(dev->dev, THIS_MODULE, adev, 0, GFP_NOWAIT, amdgpu_devcoredump_read, amdgpu_devcoredump_free); } #endif -- 2.41.0