From mboxrd@z Thu Jan 1 00:00:00 1970 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 2024AD17141 for ; Mon, 21 Oct 2024 23:04:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DF10B10E1C3; Mon, 21 Oct 2024 23:04:07 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="QvRXaC6m"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id 913C510E1C3 for ; Mon, 21 Oct 2024 23:04:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1729551846; x=1761087846; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=eTmyNpsdQ7BF2X5yedSTAPIdvme+ISA2G7RABXyaFdo=; b=QvRXaC6mDC5CDXPWux1oXbhdr17Kzx5v55O79BL7v//9DtbYNph9dUE7 qQV1uvo4A1N8eDpdDMQlXNBKczqHf7Jm+ZXsd0/gv/pzda7qHKSaVC+mE xXFfLfNFnlApvpUTi+oH1/OPEPDtTAIduBiIOH216Et4bHOPjJBn5N/Y+ Qj+lYSGLzLv9knYtaej0AZdlVbxXL1b/GvuSbN16V38G15oLQ13tjPJaK DfFFzHjL/iRjgd2tUnH1zfwIlQRF4Xe+f16lEI9jpdhMmPjBUUyUx+4F6 5fafiy694QwnUBH3hPs+zFydvxdBRkgv9GDmG2mDziEeRj8JGKatVW6dc A==; X-CSE-ConnectionGUID: jJPhcfKyTC2N29L6HScy4Q== X-CSE-MsgGUID: dx4zHzAJTL26Lbjws+Ax2A== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="28937342" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="28937342" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Oct 2024 16:04:06 -0700 X-CSE-ConnectionGUID: PI7NX8/xTSur8MoNIIAwjg== X-CSE-MsgGUID: CxYOckC0SYW0ZLKBln+/Nw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,221,1725346800"; d="scan'208";a="79302918" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmviesa007.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 21 Oct 2024 16:04:05 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 21 Oct 2024 16:04:04 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 21 Oct 2024 16:04:04 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Mon, 21 Oct 2024 16:04:04 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.171) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Mon, 21 Oct 2024 16:04:04 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Phw4gl0QrfYE6UsIxwzt7mqzY2Zw31FBJpyzaSC2pBGMh7t3vYdHukbmbWOS2VParKa22mTfOBLAvpJtTRJh7ndn/6m1x0o88+DznVQUY78d9Lklnjsf5ixzIrw2c5c+j1hbkGTZoR05ZEq0ZPQS1FAgUPGbEnEIrxRD5LTq6IvuoUkXz5yaZHbpoVTgpBEfDxU25Mg3gwjIECgDBiI2lpnrTG1KJITvzcainxNPl4NZRoUPLYRAjqkFT9iG0Aqb3d7E+E+3vXgHrr5scpnraRKTheSQMuCbDYPl8tTA/tlZhikQWfbPCczdP+FGhO15phnMT4B/qB5/jKWRWWAX9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=wx3XR223AKTcLWvvH2egKJKG+nZkuS1SHTFrwqVlZLQ=; b=XSJrRtxFrJD0iCums9Xh6V86sdRTsvHTQp8rAtrU2oKFgsFLZwBpq3oB2wVEoIqnyc1CsuvaHev26fEvuyDrb3TZK5Hvx7utwkjv5i5FTESiwe83cwOlkb0wqWzjmyDd9zFfjsPaFgbgwS5a6J3UEJNX1WDyiMrumGttQYSvl55WCAWSDrxtDhli3DR9CWz/Mb8MKAPMlVv+5po+6ozhGJnHhjKtujU21WQrBMnSFl39I1pWHxJNfxFcGIZ+Zmzw2m8KlnrygjM68dbov4ehH/1UVf7sFI19ZMlI9hqFMtyB/D+mkQCoM4U65EZeVlZnffmKhRQRJc0Zv2UBSwjMkQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH7PR11MB6522.namprd11.prod.outlook.com (2603:10b6:510:212::12) by MW4PR11MB6738.namprd11.prod.outlook.com (2603:10b6:303:20c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.27; Mon, 21 Oct 2024 23:03:56 +0000 Received: from PH7PR11MB6522.namprd11.prod.outlook.com ([fe80::9e94:e21f:e11a:332]) by PH7PR11MB6522.namprd11.prod.outlook.com ([fe80::9e94:e21f:e11a:332%6]) with mapi id 15.20.8069.027; Mon, 21 Oct 2024 23:03:56 +0000 Date: Mon, 21 Oct 2024 23:02:51 +0000 From: Matthew Brost To: Nirmoy Das CC: , Himal Prasad Ghimiray , Matthew Auld , Tejas Upadhyay Subject: Re: [PATCH] drm/xe: Don't restart parallel queues multiple times on GT reset Message-ID: References: <20241021211146.3842483-1-nirmoy.das@intel.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20241021211146.3842483-1-nirmoy.das@intel.com> X-ClientProxiedBy: BY1P220CA0025.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:5c3::12) To PH7PR11MB6522.namprd11.prod.outlook.com (2603:10b6:510:212::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH7PR11MB6522:EE_|MW4PR11MB6738:EE_ X-MS-Office365-Filtering-Correlation-Id: 8ef18b5e-adee-49fb-0bef-08dcf224a42c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?3z8wCv3XVBgHpL5qVZBf2GNXO+7fM6Vqcoo9pOlR8s3/De/JtoOls8r15wWW?= =?us-ascii?Q?X/ThdZCuZIU4l05kz9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= =?us-ascii?Q?Kt9UWujobqeNsdWwYZKorpXPdWo8tYZrj73szYBP7VF324zd615aQO4fjTVj?= =?us-ascii?Q?PTD9GxSl0EDGxxlaAqAKz56HKr9qvtgKtxxcNyrf2tqiq8J35BTQuWrnJf/7?= =?us-ascii?Q?uI7HjPlmGNRPUOLlABtadxzfwkbQLXTyvhLZ8ZceFP7MoG10jI9CbWgoCXfX?= =?us-ascii?Q?Q0HIqGaj9cfZ4L57HLTwSpwnYhbGKd3Q/65bhebsMb9o70FExpcJhoKJY0Wy?= =?us-ascii?Q?293mQY7hu72CB+yBTteCulsd45Ja+klhv1MPj1bwnTS7MAtjqMaeZphrdle4?= =?us-ascii?Q?8eFCqv7ZKh+dEXybsrdU?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH7PR11MB6522.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(376014)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?TI0tTKbQ9Mrp/5Zv0o0eQdQr/GCyMjXg7//tlV27JVIRaGLCdAxCrvnJja+A?= =?us-ascii?Q?99/Y/WVR3psYXUtjcOK9y/L4ONQYY9i+6//rJRz+a/RKNyKvNPeiyol8dwj4?= =?us-ascii?Q?J+hqyteKBYsstD4zBd4f2iwcsTzghaRkv6x0PL1ZHYm+iD6a1L10sXaU9K4P?= =?us-ascii?Q?JosBQlRds//zYdQAGQu1cqd53G4qcydG6Ps5y2Iod8azaPqZOqmQMzUhLDZZ?= =?us-ascii?Q?Fngac8kNURJguYa/WJ14oTlZawceW/+Cjcu8IUNfTFkJzd6u0FbH16tGOkad?= =?us-ascii?Q?7QoEZvQuVUdZTJ8yukpgsz/+ycFCEGuyOqMYunN9kme/rcocXd0CQJQ+b4cS?= =?us-ascii?Q?UOxXCagahyBPrR7ur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pjjOV4EUjqEb3Qr?= =?us-ascii?Q?ZAAd1z6izfdl8vjdzSf9yXzKpGF/74lhB1fOKv47BM3bLOc9xluE2YngMn2Q?= =?us-ascii?Q?r92jdzVLDxXNxgsAyU6jGJrwe7KlH7OzIRvuk+Kq8x2FXQQhLweOwmIz0s2H?= =?us-ascii?Q?rxhrPG0aFlJ0MQrh5o+HTvNIcx5dFssMK31ouE7ynzVGfafLv7HiKUXxj5Lw?= =?us-ascii?Q?UfVeJ5g/sOOtgRaSjSvAGO6d1v8OtxD/GQZM7x7dtFB4kme3ZOnYQGhG8Zm9?= =?us-ascii?Q?3ogKWzLTBdfmS5O7K7Ev+qBYkP+MoJ4egQHKLLy6PNsNmDToAOgb+ZS70JYA?= =?us-ascii?Q?i73uCxpbII41WwGGzzepx1IGRopw2TkCxxsOPtiyIB01J475luP6BFIRFxqt?= =?us-ascii?Q?Qw=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 8ef18b5e-adee-49fb-0bef-08dcf224a42c X-MS-Exchange-CrossTenant-AuthSource: PH7PR11MB6522.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Oct 2024 23:03:56.7949 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: SBODdWtn5++5018KEdB+r5ET+0lBEmlO3lJfcwynAGgkx9EEuElcQ0Czb2eWZ+oSX3Uumxibi3mjurJDn972LQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR11MB6738 X-OriginatorOrg: intel.com X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" On Mon, Oct 21, 2024 at 11:11:46PM +0200, Nirmoy Das wrote: > In case of parallel submissions multiple GuC id will point to the > same exec queue and on GT reset such exec queues will get restarted > multiple times which is not desirable. > > Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2295 > Cc: Himal Prasad Ghimiray > Cc: Matthew Auld > Cc: Matthew Brost > Cc: Tejas Upadhyay > Signed-off-by: Nirmoy Das > --- > drivers/gpu/drm/xe/xe_guc_submit.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c > index 0b81972ff651..6aeb007eaf06 100644 > --- a/drivers/gpu/drm/xe/xe_guc_submit.c > +++ b/drivers/gpu/drm/xe/xe_guc_submit.c > @@ -1784,8 +1784,13 @@ int xe_guc_submit_start(struct xe_guc *guc) > > mutex_lock(&guc->submission_state.lock); > atomic_dec(&guc->submission_state.stopped); > - xa_for_each(&guc->submission_state.exec_queue_lookup, index, q) > + xa_for_each(&guc->submission_state.exec_queue_lookup, index, q) { > + /* Skip restarting parallel queues */ > + if (exec_queue_enabled(q) && xe_exec_queue_is_parallel(q)) > + continue; This doesn't look right as exec_queue_enabled can race here... I think this should be... if (q->guc->id != index) continue; This way we only call guc_exec_queue_start once per queue parallel exec queue. Also I think we need to add the same check to xe_guc_submit_stop. Matt > + > guc_exec_queue_start(q); > + } > mutex_unlock(&guc->submission_state.lock); > > wake_up_all(&guc->ct.wq); > -- > 2.46.0 >