Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F374C606A31A for ; Tue, 1 Dec 2026 00:20:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=QpeCNfED Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AC7DF10F59D; Tue, 1 Dec 2026 00:20:49 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) by gabe.freedesktop.org (Postfix) with ESMTPS id D058410F587 for ; Tue, 1 Dec 2026 00:20:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796084443; x=1827620443; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=7Wvk/t1wdtPUkJN7fWs+280kb1xaVmDFtCZKYMjLuvg=; b=QpeCNfEDh6LU/BkVAcu2GBQrDjQsYxcg/TE2viGGYfOAgl9c2sc9iypC qxvkWTvaNB2AtZB2pzfH9NDo6Qii47zsoCLyFWE5k0MrCCpl2IOF5FMFX 66Pykz99tC+RrJtm/s6bYsr+jkclq8nMHwoKRvg9XIJhvBbamPFN57J44 q1SSezUipM1v6sKmjAOYMhC0ugBZRnpulgs7W0lobgxvsNM/kzl6SACri ilAtRDO8ReJFsMSwqsaO/xX6fhE5ILqOZQlsdil6Q6ZgXOZlH4WNV9vXa nD4BHcE6uVDrWptul+IXrlUT4DB1YMkyqanXSMBRlQO85vVq0rB5ZIXrV g==; X-CSE-ConnectionGUID: St2EBvLNQ+mjGWg6ZJO63A== X-CSE-MsgGUID: Wlt/P/MAR8287MpL8swgyg== X-IronPort-AV: E=McAfee;i="6800,10657,11982"; a="4902641" X-IronPort-AV: E=Sophos;i="6.27,243,1787036400"; d="scan'208";a="4902641" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2026 16:19:50 -0800 X-CSE-ConnectionGUID: F/bhXxRyTvCzlPV5xFFWLg== X-CSE-MsgGUID: 4WJmP9IkRTaCw3wsV49OhQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,243,1787036400"; d="scan'208";a="13209102" Received: from orsmsx902.amr.corp.intel.com ([10.22.229.24]) by fmviesa005.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2026 16:19:50 -0800 Received: from ORSMSX901.amr.corp.intel.com (10.22.229.23) by ORSMSX902.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.57; Mon, 30 Nov 2026 16:19:49 -0800 Received: from ORSEDG902.ED.cps.intel.com (10.7.248.12) by ORSMSX901.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.57 via Frontend Transport; Mon, 30 Nov 2026 16:19:49 -0800 Received: from BL0PR03CU003.outbound.protection.outlook.com (52.101.53.17) by edgegateway.intel.com (134.134.137.112) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.57; Mon, 30 Nov 2026 16:19:39 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Lc67peq39kAEZq7E4sDsskwFQLMIFV8iODkA0bfcGg+vzon7rewP2pZ2PHdIvWwaHE0ivMmjTYqw3oUWHV1KDsgKRqHSK6ZMapHl70ikG9YFlUk33S+hbq8NxfIx1+vzGdpFPq7LIvkRiF7AvJa5ssaQorQnOH6JxBpVV4Tmt8v6L8k/U5CYIAXgyt+6g024xRqwHmzfAa7gwjcMuRe11plTjogAvgXZPlb9tlDaZPe3IRvQsNTX6IA4vwhe5KZmDpQZYJbG0PaOGRWmSSjwCVXj43ilJ9WgJ2FIYlnqF0PXddQQlxMHiaCDk/mw+9bYqJNRJcXxtO5YRwiqEDLfPg== 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=7Wvk/t1wdtPUkJN7fWs+280kb1xaVmDFtCZKYMjLuvg=; b=nq7L1WG/6NUQH3WeLeonb1idMK//lIXhaiXgeVaD1XytTeIUNa446loYuhUUJ5Yv7VZ8BBccyma4wpOiDZCTCYTCiznB58DGWkaIEBGKraPRHcDKjG8GrDTSncDV8oM+Rrdo5+W0++m5odKmUhO3+75f5fpMGIySyRmlHHr0ZGwa4OtBCJluppXU2Uxi+v5eC6U0CzjVjNp9fcZ9FQJU7XH4fQg9DW+Jf2u++yvqPwfLr15a7fzwK5aLA/BkaxrpyzpJRQt0fvOuMVKKU8dlQupL+I+ptjXII0/83ynCBAgoqEQHcuYY5Qn5dMXNRTES6AU1v2kb+7/7HDKeiPwCnw== 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: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from CH3PR11MB8185.namprd11.prod.outlook.com (2603:10b6:610:159::12) by CY5PR11MB6259.namprd11.prod.outlook.com (2603:10b6:930:24::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.662.13; Tue, 1 Dec 2026 00:19:35 +0000 Received: from CH3PR11MB8185.namprd11.prod.outlook.com ([fe80::443e:8ff8:c5ac:1ac4]) by CH3PR11MB8185.namprd11.prod.outlook.com ([fe80::443e:8ff8:c5ac:1ac4%4]) with mapi id 15.21.0662.012; Tue, 1 Dec 2026 00:19:35 +0000 Date: Mon, 30 Nov 2026 16:19:32 -0800 From: Matt Roper To: Himal Prasad Ghimiray CC: , Thomas =?iso-8859-1?Q?Hellstr=F6m?= , Rodrigo Vivi , Matthew Auld , Matthew Brost , Michal Mrozek Subject: Re: [PATCH 2/2] drm/xe/cri: Increase default CCS preempt timeout to 7.5s Message-ID: <20261201001932.GK6134@mdroper-desk1> References: <20261123123436.2114961-3-himal.prasad.ghimiray@intel.com> <20261123123436.2114961-4-himal.prasad.ghimiray@intel.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261123123436.2114961-4-himal.prasad.ghimiray@intel.com> X-ClientProxiedBy: SJ0PR13CA0076.namprd13.prod.outlook.com (2603:10b6:a03:2c4::21) To CH3PR11MB8185.namprd11.prod.outlook.com (2603:10b6:610:159::12) X-Archived-By: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH3PR11MB8185:EE_|CY5PR11MB6259:EE_ X-MS-Office365-Filtering-Correlation-Id: 53608390-6a5a-4505-b00b-08df4f40c71f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|1800799024|366016|23010399003|11063799006|4143699003|6133799003|261009223027099003|18002099003|22082099003|10067099003|56012099006|261028144727099003|261026121527099003|261026140227099003|261022113327099003|261022105027099003|261021121427099003|261022075727099003|261102123227099003; X-Microsoft-Antispam-Message-Info: 6hb6E8odS7geQrLasMkZaIcQ2/CK5pULDA7eFD10gDh2C/roUuwLYdkiTeNAZg1VFtM143OeBHsg015wI4rIK2c4amRTXH4w0wrDNxFvTrFPNtGwE4/wHnZ2azbb2oJPXsD3QZQUFSZjKdCZf/qA9L4dxBEMiK0DnQ05B+RZcDBjI9ueU9GIVp0tce6nBlk93DBnNqiP3eUcAU1puOdRWX0V8hVrKsBZLsLB94BSyKU3J+n23X8jpgoQlkWXTdtkN06GANVofExk6uIFMA+DFc+YdT2pJE3OnD8dIxXF1orlB7et2V2AwZ4Wt93jXsBlUKFzjra8FoI/0HkC8kNLg17ansCaf0ExBwKdgsqxyPUmdijdb3kexKro8PYYxxiZ/p1CpN8Ow1xw2X5yRtuKQodxv+xu74GnhH49K2lAlmEABoyhjbVVqbrYbJ7ce+uw0paKMOIipzSm43jar8pmoMgsbaniEvGcEyLyyQYp2459b96/65rpZTGbbCeGep0BklP27KVnRN1SwYOkyizTn0JRlh/YkLLpuIdBSdQJegZYK8OTuf7BEUzkttx8VXPoJA+kwzUHQbz94jISGvIDtAoHMTjMeHYfqSCpv3uVirpwc8arBwZk/ECKr6bqeH+FWfMnSsIxjhp++dvd7Fz16cOOPeWTg9uRr4Ckh8QLSdw= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH3PR11MB8185.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016)(23010399003)(11063799006)(4143699003)(6133799003)(261009223027099003)(18002099003)(22082099003)(10067099003)(56012099006)(261028144727099003)(261026121527099003)(261026140227099003)(261022113327099003)(261022105027099003)(261021121427099003)(261022075727099003)(261102123227099003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?Tp5gtOJl578cIqDI5xVdkvA2LOhu4mwhNdfvpHVfRVvz9uyB8O+Ue+dQ6D0u?= =?us-ascii?Q?IEhVEXYYowVH1xIzr+9PtZirbKQOTKg69h4AdxffSnYM7QLHyTXrMVVFPkbb?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QzoNHiYyyCDSOPf44BkuaUZ2WMVJOQRA5oJwk6EetyXYQRj7iUsxzet8/zfZp+SYLyb71IA0ytu1qn98cFXhNz2vhiXDMX2P5VQE+wj2qycpWYkNXDsExmL9Z7SPIM/4TDHP1buDVs9waJeY3vpIoj/WJOlsnJ6heTPjbLv9aM26CHT1PedzZ1Nu7zXbWVlMCXtjobMPelU1k+uT9s9oSGhcTcvR3dX1xtPrPrg/Icx2MmhqCXlWY3PNQ== X-MS-Exchange-CrossTenant-Network-Message-Id: 53608390-6a5a-4505-b00b-08df4f40c71f X-MS-Exchange-CrossTenant-AuthSource: CH3PR11MB8185.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2026 00:19:35.3775 (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: jkFv3jF6y1zlyW5kgArPyDxSmQFWEi5WthcRUiBrdOjVLxZTjy/9tKORfK1N7gi3Jo3qeEWM0LX2z42TGzxOTmeObp6O4c15mHkfAld552E= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR11MB6259 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-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Intel-xe" X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Mon, Nov 23, 2026 at 06:04:38PM +0530, Himal Prasad Ghimiray wrote: > CRI uses thread-group preemption for compute, as mid-thread preemption > cannot be used there. A context can then only be preempted at a > work-group boundary, so the default 640ms preempt timeout is too short > under concurrency and leads to engine resets. Default the CCS preempt > timeout to 7.5s on CRI; it remains tunable via sysfs. If higher-priority work comes in while a low-priority context is hogging the GPU and not allowing timely preemption, the preemption timeout is supposed to be the safety net that ejects the low-priority workload from the engine so that it can be reclaimed by the high-priority context. I don't think we can really say that 640ms (or any hardcoded value) is "too short" or "too long" since this all comes down to a policy decision that's based on what workloads a specific user is running and how much the relative priorities of those workloads matter to them. The drivers (KMD and UMD) shouldn't be the ones making this kind of decision in my opinion. Forcing high-priority work wait up to 7.5 seconds before it can actually reclaim the GPU might be okay in some settings where the high priority work isn't really *high* priority, but could be absolutely catastrophic in other settings where this causes the high priority work to miss a deadline. It feels wrong to be making platform-specific hacks like this. We have existing knobs that allow users to set the policy that's appropriate for their setup and we really do expect them to be using those when necessary. Granted, CRI's use cases are somewhat limited (no render support, so less soft-realtime requirements to preempt quickly for things like rendering displayable content), so maybe a lot of CRI users don't care terribly much about this, but I still think we should avoid changing behavior (and effectively breaking the safety net) based on XE_CRESCENTISLAND and such. Even on other non-CRI platforms, mid-thread preemption isn't guaranteed to be used (or even available), so if this was really a widespread problem on CRI, it could be a problem on those other platforms as well. Matt > > Cc: Michal Mrozek > Signed-off-by: Himal Prasad Ghimiray > --- > drivers/gpu/drm/xe/xe_hw_engine.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/gpu/drm/xe/xe_hw_engine.c b/drivers/gpu/drm/xe/xe_hw_engine.c > index 7f304b9fe0e1..959661ecb1a2 100644 > --- a/drivers/gpu/drm/xe/xe_hw_engine.c > +++ b/drivers/gpu/drm/xe/xe_hw_engine.c > @@ -581,6 +581,13 @@ static void hw_engine_init_early(struct xe_gt *gt, struct xe_hw_engine *hwe, > } > } > > + /* CRI compute uses thread-group preemption, which needs a longer timeout */ > + if (gt_to_xe(gt)->info.platform == XE_CRESCENTISLAND && > + hwe->class == XE_ENGINE_CLASS_COMPUTE) > + hwe->eclass->sched_props.preempt_timeout_us = > + min_t(u32, 7500 * 1000, > + hwe->eclass->sched_props.preempt_timeout_max); > + > /* Record default props */ > hwe->eclass->defaults = hwe->eclass->sched_props; > } > -- > 2.43.0 > -- Matt Roper Graphics Software Engineer Linux GPU Platform Enablement Intel Corporation