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 ABEE5C433F5 for ; Thu, 19 May 2022 13:41:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3790811A6BD; Thu, 19 May 2022 13:41:39 +0000 (UTC) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1anam02on2042.outbound.protection.outlook.com [40.107.96.42]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2067111A6BD for ; Thu, 19 May 2022 13:41:38 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZWwHSjcwCWA0CKhyD2mLLJSggOBOJVCJ0OI1x7GLRyEa6ba7KPH3nxClFsf+d2lbnUkalvBlCFZ6FCtXvJ4xAM/dagMHEJIjYxUw41hPXRWwhTBuCDIatdm7T3EWQC/yPO9jDiOUddOtVLcfKCse1U9g5wD7dRZhd0tO9YxycMX26Uq0Uhj3WbAR4VhOgROXB7fLkk1CxwEB1wh6HcAQqVza3TKJO0ojqjYKhAUM0zDBTlygRNzWZStRh9kbO1CaHnWfWh9tdSnu2qirkC8TcCbNW/+ytLmHyY0B9FIIGKzVOkIuYdS9JIeHr9aRakEVjd0UdMe19CE40ZRvJQyaTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Y5b424ECEaJUJiIOW6cK2yANJrmmnPv23n04pVh/W6U=; b=VrOXtoYsyZTQ9qx91XqQHT8Mnd8lxuri+b28tYTeMzXonItn/4Vdvx1FKL90f/1Pfqd/bUzJqPcVbz2aoaRHt5BR3aeP2xJ1snhGm/uGbGgW2lDvpAb68YezAD6Mwt7Ox8orhCZeywAQEo+JpNPpWv07oSFGSmsVZ9pjcAgEZIlf3h3JhH+KyMKkz6/ZU/T3IDSFb/rWagBsSJ8DABmla+jCsmqvBESqBPQzeLUbUnsqJgu4LUSMK/daudbWx/vnJ+QMo+tp7Ajp0gPfi0XlELJYUKwE4Vm7NqGpD7Eb0gCIy5NWrdAm2VdiTcoptTxgDXZZcDtt1Ybuf8eLpEtNaw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Y5b424ECEaJUJiIOW6cK2yANJrmmnPv23n04pVh/W6U=; b=mBgnnS4IbfmdzrP3sK0lDf13VPrwyDOsGYyIAhdT1YHQEkFLYhMGrux4hfaIN0EkY9NuFeEFw49qpca0ezyiaxlJW6YXQmgoMMS3Y63G1pccRCKAA/qzRFclRgSkSd+aF83CarkBqb/PmoBvbd9RX83y/CzoSe1c7WvK/mHwkBg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DM5PR12MB1947.namprd12.prod.outlook.com (2603:10b6:3:111::23) by DM5PR12MB1868.namprd12.prod.outlook.com (2603:10b6:3:106::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.15; Thu, 19 May 2022 13:41:35 +0000 Received: from DM5PR12MB1947.namprd12.prod.outlook.com ([fe80::9d18:7a38:7c5d:4a40]) by DM5PR12MB1947.namprd12.prod.outlook.com ([fe80::9d18:7a38:7c5d:4a40%10]) with mapi id 15.20.5250.018; Thu, 19 May 2022 13:41:35 +0000 Content-Type: multipart/alternative; boundary="------------QAPpV04o6BrcAfe3EjKE6sEr" Message-ID: Date: Thu, 19 May 2022 09:41:32 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH v2 0/7] Fix multiple GPU resets in XGMI hive. Content-Language: en-US To: =?UTF-8?Q?Christian_K=c3=b6nig?= , =?UTF-8?Q?Christian_K=c3=b6nig?= , amd-gfx@lists.freedesktop.org References: <20220517192102.238176-1-andrey.grodzovsky@amd.com> <1a7fd05f-490b-9999-5f0b-e84af26504a9@amd.com> <3abdd2a3-2cb8-fc8f-fd5d-a8a7cd5fc828@gmail.com> From: Andrey Grodzovsky In-Reply-To: <3abdd2a3-2cb8-fc8f-fd5d-a8a7cd5fc828@gmail.com> X-ClientProxiedBy: YT3PR01CA0119.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:85::24) To DM5PR12MB1947.namprd12.prod.outlook.com (2603:10b6:3:111::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ca40d39c-4ccc-46d1-8a37-08da399d4ab3 X-MS-TrafficTypeDiagnostic: DM5PR12MB1868:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 61rWRsK31o3FjddOeMCzt1nTfESeudZ9u86NvPCWft69De72hlo0wadq9Ou1EOAhZZwAEQkmdNHo+8IxH1YbErMc+7VeaHQGn2+MZLx7cf3th6AneC5dS6ScqNd32/NTMZF+jErDRB1qB66fyVlyahP2dk0DGT92rn/bFaUT/4nr9NhRk1j5tkX4LrApGxvxHYZXl9x1Z4wK0YX5o1kFc5yX8PUHCPkeKS90vsU0/zY8/NnOjoI9Xbqn68Bd4y8dgRC8D+OLkzJH2VpwukX0cjjfWepdbT3kBNC0zliSRqUwSaOI/6XcGqDtu431eiBE6D/mGZ3YYbEfzGtVrSp8aZXtM3DGiG16eoT1RzrB5DsftDYEvZXdhfVDTfHE1D5iWA3RFxwQBcb30+kuk6Wd3Qdd9aOM16GikeVSpykmQ+0WYFzmEaeNF7FA81xk+34eKvg1sKgepKb2897hRiocX+lwHlSKx5W3RFC3aVT8UAEilw3Dh/FGtRhcmZ02vWHBSGoRU4t0cu+x7K4VbT05g+mwQnMpqvu6E7/tYhLhAUAvNi/fh+avfo6LZt95RFzDMqqm2DXQhu9I/IPaTM3pT3QvzXXZlD4rAg9vlag2IVRaibt30bxhffmp1KCnj1EDQ2k6fMpqHV1HnUfKgr97gYVbWwyJffXCADV0Mrxih7QluPXjsht/2WJpPBpuZmxdtjtjTlBtvVpvXwhHUjiDqEGpUM0I0p57/7Xkn9ciFhOMPeHW+ZMJBez3TVCV7vUwc27qvgL221XIpwYZHAsf8cBIbNPhUA2BJka0f4jQdaRgSdcTXoJv7rLNECL7zl+j X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR12MB1947.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(5660300002)(66946007)(66476007)(36756003)(53546011)(8936002)(66556008)(31686004)(6506007)(2616005)(83380400001)(44832011)(166002)(186003)(33964004)(6512007)(38100700002)(4326008)(8676002)(316002)(508600001)(6486002)(966005)(2906002)(6666004)(110136005)(86362001)(66574015)(31696002)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 2 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SzZYVVlaNXZoMG1ZL3FJKzlrUFpYUzdtcm1CYmxncGlCVk05MWlWeVE3T0tZ?= =?utf-8?B?OHFlbnNDdFM5MnkvR0d3NXZ3bWxKU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djdDd1RrUjdTek1hcDFsTkcrSGM2NEE5QTVPbnNUY1Z5TkNiajd0WkdI?= =?utf-8?B?bS9oeWZDa3UvSUZHMFg2dVJYbVhHR3JhVURYZUpBdVFUUlplRElEQjNwYzN4?= =?utf-8?B?amxtMHNjWFlZUDdkRk5WK0o1SnRKYmJBWitmUldGaUNybDNDSmFxMWtrUVor?= =?utf-8?B?K0pNeFNIQ2NOT2hNV2dvRXN0Y1JmdUlPb3Z1OWJIVlIxVms3UnpYazNtZ1dX?= =?utf-8?B?OUJqYVlsT3k5TmNmZjNHUVV6RDhnUWZwMFN1azJxeE9veE1iblplNmFscUFi?= =?utf-8?B?dmhSVXBueklTV0xndXFlbWZEMEFDTGpxSjNEN2Q2RDZmdW1aWEpXcWxCelBk?= =?utf-8?B?eGRzOWNyRHB6NHVXaVBta0xRbVdJczVXTlRJekMyQko4c3NBYk1QNThISVkz?= =?utf-8?B?V0hwTXhFcFNEUG85YTNYWnVpd2o4OS85ZTJCSENYMWtuTWwzd0cvWENlai9T?= =?utf-8?Q?d+YFH+yEotaD/krjwLmxZmytfS3aVGhQYtymGEo2rQLdh?= X-MS-Exchange-AntiSpam-MessageData-1: INMosgZ7snKtkg== X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: ca40d39c-4ccc-46d1-8a37-08da399d4ab3 X-MS-Exchange-CrossTenant-AuthSource: DM5PR12MB1947.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 May 2022 13:41:35.3994 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 4v8k87H9w8ytjIcTOHsZJ+qaDP+QEp89UPZe0ShZoaZH4nzrBgkBzt7hjgvsI2yGT/0WBBdxR5bgMh+8ksI/sQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1868 X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Zoy.Bai@amd.com, lijo.lazar@amd.com Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" --------------QAPpV04o6BrcAfe3EjKE6sEr Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2022-05-19 03:58, Christian König wrote: > > > Am 18.05.22 um 16:24 schrieb Andrey Grodzovsky: >> >> >> On 2022-05-18 02:07, Christian König wrote: >>> Am 17.05.22 um 21:20 schrieb Andrey Grodzovsky: >>>> Problem: >>>> During hive reset caused by command timing out on a ring >>>> extra resets are generated by triggered by KFD which is >>>> unable to accesses registers on the resetting ASIC. >>>> >>>> Fix: Rework GPU reset to actively stop any pending reset >>>> works while another in progress. >>>> >>>> v2: Switch from generic list as was in v1[1] to eplicit >>>> stopping of each reset request from each reset source >>>> per each request submitter. >>> >>> Looks mostly good to me. >>> >>> Apart from the naming nit pick on patch #1 the only thing I couldn't >>> of hand figure out is why you are using a delayed work everywhere >>> instead of a just a work item. >>> >>> That needs a bit further explanation what's happening here. >>> >>> Christian. >> >> >> Check APIs for cancelling work vs. delayed work - >> >> For work_struct the only public API is this - >> https://elixir.bootlin.com/linux/latest/source/kernel/workqueue.c#L3214 >> - blocking cancel. >> >> For delayed_work we have both blocking and non blocking public APIs - >> >> https://elixir.bootlin.com/linux/latest/source/kernel/workqueue.c#L3295 >> >> https://elixir.bootlin.com/linux/latest/source/kernel/workqueue.c#L3295 >> >> I prefer not to go now into convincing core kernel people of exposing >> another interface for our own sake - from my past experience API >> changes in core code has slim chances and a lot of time spent on back >> and forth arguments. >> >> "If the mountain will not come to Muhammad, then Muhammad must go to >> the mountain" ;)* >> * >> > > Ah, good point. The cancel_work() function was removed a few years ago: > > commit 6417250d3f894e66a68ba1cd93676143f2376a6f > Author: Stephen Hemminger > Date:   Tue Mar 6 19:34:42 2018 -0800 > >     workqueue: remove unused cancel_work() > >     Found this by accident. >     There are no usages of bare cancel_work() in current kernel source. > >     Signed-off-by: Stephen Hemminger >     Signed-off-by: Tejun Heo > > > Maybe just revert that patch, export the function and use it. I think > there is plenty of justification for this. > > Thanks, > Christian. Ok - i will send them a patch - let's see what they say. Andrey > >> ** >> >> Andrey >> >>> >>>> >>>> [1] - >>>> https://lore.kernel.org/all/20220504161841.24669-1-andrey.grodzovsky@amd.com/ >>>> >>>> Andrey Grodzovsky (7): >>>>    drm/amdgpu: Cache result of last reset at reset domain level. >>>>    drm/amdgpu: Switch to delayed work from work_struct. >>>>    drm/admgpu: Serialize RAS recovery work directly into reset domain >>>>      queue. >>>>    drm/amdgpu: Add delayed work for GPU reset from debugfs >>>>    drm/amdgpu: Add delayed work for GPU reset from kfd. >>>>    drm/amdgpu: Rename amdgpu_device_gpu_recover_imp back to >>>>      amdgpu_device_gpu_recover >>>>    drm/amdgpu: Stop any pending reset if another in progress. >>>> >>>>   drivers/gpu/drm/amd/amdgpu/amdgpu.h        |  4 +- >>>>   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 15 +++++- >>>>   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h |  1 + >>>>   drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 62 >>>> +++++++++++----------- >>>>   drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c  | 19 ++++++- >>>>   drivers/gpu/drm/amd/amdgpu/amdgpu_job.c    |  2 +- >>>>   drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c    | 10 ++-- >>>>   drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h    |  2 +- >>>>   drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c  |  1 + >>>>   drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h  |  5 +- >>>>   drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h   |  2 +- >>>>   drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c      |  6 +-- >>>>   drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c      |  6 +-- >>>>   drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c      |  6 +-- >>>>   14 files changed, 87 insertions(+), 54 deletions(-) >>>> >>> > --------------QAPpV04o6BrcAfe3EjKE6sEr Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit


On 2022-05-19 03:58, Christian König wrote:


Am 18.05.22 um 16:24 schrieb Andrey Grodzovsky:


On 2022-05-18 02:07, Christian König wrote:
Am 17.05.22 um 21:20 schrieb Andrey Grodzovsky:
Problem:
During hive reset caused by command timing out on a ring
extra resets are generated by triggered by KFD which is
unable to accesses registers on the resetting ASIC.

Fix: Rework GPU reset to actively stop any pending reset
works while another in progress.

v2: Switch from generic list as was in v1[1] to eplicit
stopping of each reset request from each reset source
per each request submitter.

Looks mostly good to me.

Apart from the naming nit pick on patch #1 the only thing I couldn't of hand figure out is why you are using a delayed work everywhere instead of a just a work item.

That needs a bit further explanation what's happening here.

Christian.


Check APIs for cancelling work vs. delayed work -

For work_struct the only public API is this - https://elixir.bootlin.com/linux/latest/source/kernel/workqueue.c#L3214 - blocking cancel.

For delayed_work we have both blocking and non blocking public APIs -

https://elixir.bootlin.com/linux/latest/source/kernel/workqueue.c#L3295

https://elixir.bootlin.com/linux/latest/source/kernel/workqueue.c#L3295

I prefer not to go now into convincing core kernel people of exposing another interface for our own sake - from my past experience API changes in core code has slim chances and a lot of time spent on back and forth arguments.

"If the mountain will not come to Muhammad, then Muhammad must go to the mountain" ;)


Ah, good point. The cancel_work() function was removed a few years ago:

commit 6417250d3f894e66a68ba1cd93676143f2376a6f
Author: Stephen Hemminger <stephen@networkplumber.org>
Date:   Tue Mar 6 19:34:42 2018 -0800

    workqueue: remove unused cancel_work()
    
    Found this by accident.
    There are no usages of bare cancel_work() in current kernel source.
    
    Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
    Signed-off-by: Tejun Heo <tj@kernel.org>


Maybe just revert that patch, export the function and use it. I think there is plenty of justification for this.

Thanks,
Christian.


Ok - i will send them a patch - let's see what they say.

Andrey



Andrey



[1] - https://lore.kernel.org/all/20220504161841.24669-1-andrey.grodzovsky@amd.com/

Andrey Grodzovsky (7):
   drm/amdgpu: Cache result of last reset at reset domain level.
   drm/amdgpu: Switch to delayed work from work_struct.
   drm/admgpu: Serialize RAS recovery work directly into reset domain
     queue.
   drm/amdgpu: Add delayed work for GPU reset from debugfs
   drm/amdgpu: Add delayed work for GPU reset from kfd.
   drm/amdgpu: Rename amdgpu_device_gpu_recover_imp back to
     amdgpu_device_gpu_recover
   drm/amdgpu: Stop any pending reset if another in progress.

  drivers/gpu/drm/amd/amdgpu/amdgpu.h        |  4 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 15 +++++-
  drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h |  1 +
  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 62 +++++++++++-----------
  drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c  | 19 ++++++-
  drivers/gpu/drm/amd/amdgpu/amdgpu_job.c    |  2 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c    | 10 ++--
  drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h    |  2 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c  |  1 +
  drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h  |  5 +-
  drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h   |  2 +-
  drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c      |  6 +--
  drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c      |  6 +--
  drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c      |  6 +--
  14 files changed, 87 insertions(+), 54 deletions(-)



--------------QAPpV04o6BrcAfe3EjKE6sEr--