Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp638107pxv; Thu, 15 Jul 2021 12:09:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxxxHw3dpB1HE9duaBwTJ5NgVFkoFe7Z1A+Ca2SevdHUOp7vdej0NpGgUe+YoaojS8Wywn4 X-Received: by 2002:a92:d84f:: with SMTP id h15mr3759342ilq.12.1626376160353; Thu, 15 Jul 2021 12:09:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626376160; cv=none; d=google.com; s=arc-20160816; b=NmrHqNF9xFQsBtY1mhmvjN9aKmO4YH7HAlEECv92pg5RXSpF47iSMQzmjeHi1z34sE npZBESayY8exirpKRbGEiMRqgyPAHQYdCLRg6VGOs4o6Ordp2NtR9bFeOF5iV5W06XKJ e28yvmhzyw9/oeWJE1TdJ79+gsDmS15umfYZ+ZsB2l5hemV/O+2+q7v22vpRCwy8TYS+ 4dTKJ7ycqm5ZKMlO6gD+M/EMtXeck2UNrengpmK4lmOeB7ZVlkluN2fX/uPMqC6YovUD UcLoPaq1gwfh/UvyYZmJTuqYW5lsf+/W7VoXlv7Dgd1w/wVs/UWblqEPBjie158ZAZmv ITpQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hqLmT2dMOcOOs54rPMF7EwjI0dXYu+Ws/27CQX7V1M8=; b=r2PFBMCS9YJvmdn7IVG3ZxmCgdp83X5luyKL4wtreC+rHVqvwAIquRXpGq/qPQa1DT 1o1szBIUtUOWpXhAH2iJoR7wleyiXs2Nvxbh1QC7VhS46orJB2W7AHcAKFXprBJqJqBx LmACUbocmMzADaJ/SEc8IKwysYroay7cnGuC1GQlGPNEZWyL0tTojLTbhWXuWetgcAti y1xf3cbqfdh3FQs6xK3/xxIEvvmm4KbEEd04TjnSEE3C3VF7wMUz+kz8BgioghJJWbh8 nVlr3oLjrE0Je8eI+C1jf/YfmG1NH7qVqhBfD6U6sUnUwtCydOnSu+84Ho3bHQc5wngq U+Jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RR0PMtZ2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m10si9944755ilu.53.2021.07.15.12.09.06; Thu, 15 Jul 2021 12:09:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RR0PMtZ2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241369AbhGOTIl (ORCPT + 99 others); Thu, 15 Jul 2021 15:08:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:35016 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241637AbhGOS5v (ORCPT ); Thu, 15 Jul 2021 14:57:51 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4394C613D8; Thu, 15 Jul 2021 18:54:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626375296; bh=LmPYPspyED4WBFtx+BnP0s9Gg5Ua+lcvDotTG9WIFAI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RR0PMtZ2CfxOfgJQRmvP/zdIDip+jnXy561eprek49Ant/tsgprG3pi0KSabqtX+A yKOpSWdKpBUdxbc6mdCgWMuCS3aFim/ZX3wt4bVhBsnTKv4AhBfRYVkVyhUsGdSnEh B0ZYa7JpYdFcqgokGSCxXoasWyROVRkzJTOT9C40= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Christian=20K=C3=B6nig?= , Daniel Vetter , Alex Deucher , Sasha Levin Subject: [PATCH 5.12 009/242] drm/amdgpu: change the default timeout for kernel compute queues Date: Thu, 15 Jul 2021 20:36:11 +0200 Message-Id: <20210715182553.434744203@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182551.731989182@linuxfoundation.org> References: <20210715182551.731989182@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alex Deucher [ Upstream commit 67387dfe0f6630f2d4f412ce77debec23a49db7a ] Change to 60s. This matches what we already do in virtualization. Infinite timeout can lead to deadlocks in the kernel. Reviewed-by: Christian König Acked-by: Daniel Vetter Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 +++----- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index a32b41e4c24e..1b69aa74056d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -3141,8 +3141,8 @@ static int amdgpu_device_get_job_timeout_settings(struct amdgpu_device *adev) int ret = 0; /* - * By default timeout for non compute jobs is 10000. - * And there is no timeout enforced on compute jobs. + * By default timeout for non compute jobs is 10000 + * and 60000 for compute jobs. * In SR-IOV or passthrough mode, timeout for compute * jobs are 60000 by default. */ @@ -3151,10 +3151,8 @@ static int amdgpu_device_get_job_timeout_settings(struct amdgpu_device *adev) if (amdgpu_sriov_vf(adev)) adev->compute_timeout = amdgpu_sriov_is_pp_one_vf(adev) ? msecs_to_jiffies(60000) : msecs_to_jiffies(10000); - else if (amdgpu_passthrough(adev)) - adev->compute_timeout = msecs_to_jiffies(60000); else - adev->compute_timeout = MAX_SCHEDULE_TIMEOUT; + adev->compute_timeout = msecs_to_jiffies(60000); if (strnlen(input, AMDGPU_MAX_TIMEOUT_PARAM_LENGTH)) { while ((timeout_setting = strsep(&input, ",")) && diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index e92e7dea71da..f9728ee10298 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -272,9 +272,9 @@ module_param_named(msi, amdgpu_msi, int, 0444); * for SDMA and Video. * * By default(with no lockup_timeout settings), the timeout for all non-compute(GFX, SDMA and Video) - * jobs is 10000. And there is no timeout enforced on compute jobs. + * jobs is 10000. The timeout for compute is 60000. */ -MODULE_PARM_DESC(lockup_timeout, "GPU lockup timeout in ms (default: for bare metal 10000 for non-compute jobs and infinity timeout for compute jobs; " +MODULE_PARM_DESC(lockup_timeout, "GPU lockup timeout in ms (default: for bare metal 10000 for non-compute jobs and 60000 for compute jobs; " "for passthrough or sriov, 10000 for all jobs." " 0: keep default value. negative: infinity timeout), " "format: for bare metal [Non-Compute] or [GFX,Compute,SDMA,Video]; " -- 2.30.2