From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.remote-ip=192.198.163.17 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=fail; t=1796078956; b=Fucl40OyEM7EMbEQbi0GX6y+QXCYNJ9//bS2tgmypA8UWE/8SBBjXKx+KVGbQNxvUGN/ P0wNpuDhqzGUzpTaVFc59zyYPYbweqEYYXesAXcKYas4VmT/3WGU8LSF2cTYC4fz8Nj8l YDhVfCtDmgY80DhNdKpUhH8Rl8XsV/xZHQgeGvE/TQfNYNnazgJ0dwpqEWaL9Gw+JaAqr 7KgxQAa/Ylp7EnuJUjekF3VKbPivskehULaL2zPpMmGVqab20Yr+At9eHtouXWpulQs8Q tj1SHnIOsbS4ELkMVwlE3ZRe53zO1IkL4jV5p3bq2bPMQ6DblYEz/MpcXW0qBdbsNYA== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796078956; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:Received:Received: Received:Received:Received:Date:From:To:CC:Subject:Message-ID: References:Content-Type:Content-Disposition:Content-Transfer-Encoding: In-Reply-To:X-ClientProxiedBy:MIME-Version:X-MS-PublicTrafficType: X-MS-TrafficTypeDiagnostic:X-MS-Office365-Filtering-Correlation-Id: X-LD-Processed:X-MS-Exchange-SenderADCheck: X-MS-Exchange-AntiSpam-Relay:X-Microsoft-Antispam: X-Microsoft-Antispam-Message-Info:X-Forefront-Antispam-Report: X-MS-Exchange-AntiSpam-MessageData-ChunkCount: X-MS-Exchange-AntiSpam-MessageData-0:X-Exchange-RoutingPolicyChecked: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-AuthSource:X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-OriginalArrivalTime: X-MS-Exchange-CrossTenant-FromEntityHeader: X-MS-Exchange-CrossTenant-Id:X-MS-Exchange-CrossTenant-MailboxType: X-MS-Exchange-CrossTenant-UserPrincipalName: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg; bh=kOfvWMrNkxr3XfzQQ+7upl0hQlKwMpwH1CxHK7hCGnc=; b=VtyJo0KCVkYQ4Ky0/JYCGzCRh+AKFQ5Hsd/f+5TcjRLg2oxiG/jWdKEGrZF6b87Sq7Ad kgDB7S1wVJ7fyAWQA7Hu7CzjG5ykR2KUdjQqH44TSRKcLEfglAmrK6PThTHmd7QTQbu68 5nmaNFGaKvD6pM4p/6QQZlonBlh0Vhsmo4qImUygYBmNcWDx8V6Iw3g6pRxdf254Y6E8H 3U6msddgcpTCqOFV89T3UIyh6vLb8KXZEAZM3bwTxZqXxteLIHGrRZdNQeyUq9L9opjK9 T32loNrkMmrex7avp2N8aK6amPmpxd8LnQwaIl5QRacchgfzBLVD2wzqFeJbzWfTENA== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=nijTLVkr; arc=fail smtp.remote-ip=192.198.163.17 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4E97F606A31A for ; Mon, 30 Nov 2026 22:49:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4E97F606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com 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=nijTLVkr DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796078957; x=1827614957; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=kOfvWMrNkxr3XfzQQ+7upl0hQlKwMpwH1CxHK7hCGnc=; b=nijTLVkrhsvOypy1x9jbToUADGMxxdRXQMjOxS+pYW9u8biOEViemOPR IL7+VRUqpSgUxcYPqU+QFrnonKPtH53CIZuvlq5+zREg4T7ZJOg7AKGYy 2i5TJlMFTBnqHDsXsEo9tNbjrOhSQcBglbL3z6L7inpU2zcU87khYCI+I X5pb8lz3UL8XJhFdwtSTd48Af1yEJxAlgynjpE0trPyVywa3JqLb7gdBs 1CdYb2nFe6fvMc+BzO+VTszB8B94BsLCP/DFVUy2yZ6/Th7az+5zMfRwh JuGwjnBmfs4ZpYhRVLeNM2yGEPFoiQtSZoL/i7p3Yk8INdsNSA29wXnSB Q==; X-CSE-ConnectionGUID: 2u4EFVAzR1GpB97VinD9Iw== X-CSE-MsgGUID: dGDZS6zDT9WqyeVYKPw7rw== X-IronPort-AV: E=McAfee;i="6800,10657,11982"; a="4932667" X-IronPort-AV: E=Sophos;i="6.27,243,1787036400"; d="scan'208";a="4932667" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2026 14:49:16 -0800 X-CSE-ConnectionGUID: PohnYek+Rn6AzP038kgjhA== X-CSE-MsgGUID: 1txEIOOQQQeF6UsEhmp/Xg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,243,1787036400"; d="scan'208";a="12888368" Received: from orsmsx903.amr.corp.intel.com ([10.22.229.25]) by orviesa005.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2026 14:49:11 -0800 Received: from ORSMSX901.amr.corp.intel.com (10.22.229.23) by ORSMSX903.amr.corp.intel.com (10.22.229.25) 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 14:49:10 -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 14:49:10 -0800 Received: from BL0PR03CU003.outbound.protection.outlook.com (52.101.53.13) 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 14:49:10 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=oh1cjxR3yTUq8RO5nfnVtx85NF8dzh3DAQJFWzONo3fkis5KDAYcXbkhVACDiQUiGqGuvU83rqBRpRTgrZN3jEjpbqMY9nscPUeLRud9F1os2rQ5hX6Ccj/rR1Xe1GD7ulMzOPhoUAWiIDczR2JgKvPSFtwwGZrWl5qMa+HJvQrI4lMSsqR17HREner0KLVB/hVK2igqhsNGPl+NFrDyzxBC5g+cz2Uh+qehmua/LlNlq87enxzdHwLuN76SyzwF8hAf0WsfHrmg2JxiZ+Q/FgORvOTGUFS266UteKFrOg7IrfDMA7h/nzJzowx+N6f2HTaYQaFgUlVfX5k/0Jj/7g== 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=yGB5YBze+LEwKjWlfF9az8w2sh0eW21XruqWxvqF+fQ=; b=mFiKVdJFHHNFiJZywCzU5uvO3d3ZWEaka//4sIqpQo91YWn/becWZqKiCEWV3+GtN4idbP49nUutsCiqBex9kd/P2ur763o51zoG2sbEISn/ezcSVdv96hreDFSIA8FuTozRd5J2W40B0te+OIcyl4LbpGNKe/4Z6DTu6F78VGTCz8hlZiWMG4GdRJq6UAI8npD9zkVNPeDAc38tiBXx41VAviQMsizK0WM54tPWU+8OPwN+vuiFhuoKQQB0Tcv3/xl80wlr0PXoXwnauwbarm3mdmIdO5U6pQ04G1efizksDXxWp/1kyXdIpG3BKWGLHCqamHDAtTLeHRi1lVYPMQ== 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 MW3PR11MB4684.namprd11.prod.outlook.com (2603:10b6:303:5d::14) by IA3PR11MB9110.namprd11.prod.outlook.com (2603:10b6:208:576::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.662.13; Mon, 30 Nov 2026 22:49:07 +0000 Received: from MW3PR11MB4684.namprd11.prod.outlook.com ([fe80::2f5a:96ce:f7e4:c315]) by MW3PR11MB4684.namprd11.prod.outlook.com ([fe80::2f5a:96ce:f7e4:c315%7]) with mapi id 15.21.0662.012; Mon, 30 Nov 2026 22:49:07 +0000 Date: Mon, 30 Nov 2026 14:49:04 -0800 From: Niranjana Vishwanathapura To: Matthew Brost CC: , , Carlos Santa , Ryan Neph , Christian Koenig , Huang Rui , Matthew Auld , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , , Thomas =?iso-8859-1?Q?Hellstr=F6m?= Subject: Re: [PATCH v3 22/33] drm/xe: Add Kconfig.profile options for BO defrag configuration Message-ID: References: <20260711025619.2540575-1-matthew.brost@intel.com> <20260711025619.2540575-23-matthew.brost@intel.com> Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-ClientProxiedBy: SJ0PR13CA0099.namprd13.prod.outlook.com (2603:10b6:a03:2c5::14) To MW3PR11MB4684.namprd11.prod.outlook.com (2603:10b6:303:5d::14) X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MW3PR11MB4684:EE_|IA3PR11MB9110:EE_ X-MS-Office365-Filtering-Correlation-Id: 76bdda4d-e07b-4bad-f355-08df4f3423d9 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|7416014|376014|23010399003|260925021911599003|10067099003|56012099006|11063799006|260925022911599003|260925021311599003|5023799004|261021121427099003|261009221227099003|261026121527099003|261026140227099003|261022075727099003|261022105027099003|261009221727099003|261009220027099003|261009223327099003|261009223027099003|261028144727099003|261102123227099003|261021123027099003|22082099003|18002099003|4143699003|6133799003; X-Microsoft-Antispam-Message-Info: ZsAcPRp+tSaeBkOMmNYcLXekRXDSkA2obd4hLlnQ02UEMsgyYYWQjHNatm6GIKxLFkc/XR3pa4ewha9sdFxPzKJniXAL2ZHmFJk3EDNyfFgKG4XfmUQ6IBL6FtWIrl3dC6TcieGaxPME8eLTU2OEh4BpqUmA02tzGyU6x7ujsrW6aJ/+xCL9uhmyldnrCaMVcznkO1Y2vNFa1U6VBbs+TOfgZp5UyIL1NxdsuwYrdMbpKVRvrQ5bvcygEJVO3uxKnTqqTPlRGjoQONF46imHlm/4ps+D5EqktcNbvYlUmCZ72Ztn7r+8Y64Dg7NI2jW9FtHLZIlwGlfcfrRb9+vKA8rzIVvSZrq99f7X+C1yJ6uhcArpDSBba52vQDYxrj35HTwHpeN7k5fzroqk0U4v9nZKBP3J+3EMNsNvK3v+t0pXow1axSR3BXrTBqH2e0U7GlGxEt0qlNy9ohAHeRmjlvAE7lKutm3UORNLttWsxI6nKB6qathHDvdm75560Ns42qqUparNxrDnOxPZz0eIvn8H9dSO3uzu2gA7igywAT1dgUso181arhFESCqOn5X44B0X1zkAxtkLuWlTCmMO7U2x1iNEt+GTT+NApPTVWMbDQ35smPjcgSBU4CuR5pmZT1AZ+Jy7OinhjK5wQHiKOYqsDzjYtykMboC1EqoQ3CM= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW3PR11MB4684.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(7416014)(376014)(23010399003)(260925021911599003)(10067099003)(56012099006)(11063799006)(260925022911599003)(260925021311599003)(5023799004)(261021121427099003)(261009221227099003)(261026121527099003)(261026140227099003)(261022075727099003)(261022105027099003)(261009221727099003)(261009220027099003)(261009223327099003)(261009223027099003)(261028144727099003)(261102123227099003)(261021123027099003)(22082099003)(18002099003)(4143699003)(6133799003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-1?Q?biU1RiN1zgnrzfJuB3GVYq9a7k7Ng8IzfXIk1lYp9JICg8BWTTPLvD3tKB?= =?iso-8859-1?Q?owL9XOhbQMcB73rZHBjJhyXiPZ+tINNPLC2yJpCZuzK0BTPq3AffOeMKe3?= =?iso-8859-1?Q?z//0S5/g2y4SF3XDvQ+p0+bonbEXxubPqRpzqeRV7tDRCPHjCZuM5/dYUC?= =?iso-8859-1?Q?F18FTx8qf6G8XOcqPk68C42We9tyz0ASwRydbnpsve1HT0Wb1DtUzMiqgF?= =?iso-8859-1?Q?o5Veukd8BfYqWcG0d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rRiYIqC6MvHS9kL1HwCpxBpqDnkZf4rxqKAsSAT6MJjfMCQPieCj5+d2Q51DR8Fip+es9ga92cRhB03kAlOUg36y25114nwv7yIpt0Nu2d5JJ8/JgWygZ55nJI3RDb1Q7uU0CVieRsEzkHPptxB9Ld59rCQ== X-MS-Exchange-CrossTenant-Network-Message-Id: 76bdda4d-e07b-4bad-f355-08df4f3423d9 X-MS-Exchange-CrossTenant-AuthSource: MW3PR11MB4684.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2026 22:49:07.0029 (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: EfwTV1ABz5Q7Y5q/D6mX6ZSaD33no3GxO1ddkj02MfNF64WMkFKdMI/DPS7DjbiiEj+6tpYR7jYiCoJzXL0ZI2Ix+3RGxlISsl8OHqQ1Kcz7ZFFwVQiT5Qpzngxq0c5H X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA3PR11MB9110 X-OriginatorOrg: intel.com On Tue, Nov 24, 2026 at 12:25:13PM -0800, Matthew Brost wrote: >On Sun, Nov 08, 2026 at 05:31:07PM -0800, Niranjana Vishwanathapura wrote: >> On Fri, Jul 10, 2026 at 07:56:08PM -0700, Matthew Brost wrote: >> > Add Kconfig.profile options to make XE_BO_DEFRAG_* defines configurable: >> > - DRM_XE_BO_DEFRAG_RECLAIM_BACKOFF_THRESHOLD: Threshold for TTM reclaim >> > backoff >> > - DRM_XE_BO_DEFRAG_SIZE_LIMIT: Maximum number of bytes to defrag per >> > work run >> > - DRM_XE_BO_DEFRAG_INTERVAL_MS: Default delay before defrag worker runs >> > - DRM_XE_BO_DEFRAG_INTERVAL_MAX_MS: Upper bound for defrag worker >> > interval >> > >> >> Assisted-by: LLM >> >> NIT...Would runtime knobs be useful than these compile time knobs? >> > >Yes, I think these will need to be made into runtime knobs. We'd still >have Kconfig for default though. > >> > Update xe_bo.c to use these Kconfig options as defaults via #ifdef >> > guards, maintaining backward compatibility with hardcoded values when >> > not configured. >> > >> > Additionally, disable defrag completely when XE_BO_DEFRAG_SIZE_LIMIT is >> > set less than 2M by returning early from xe_bo_defrag_update() (and >> > xe_bo_defrag_remove()) so BOs are never added to the defrag list or the >> > worker kicked; xe_bo_defrag_add() and xe_bo_defrag_schedule() assert the >> > limit is at least 2M. >> > >> > Cc: Carlos Santa >> > Cc: Ryan Neph >> > Cc: Christian Koenig >> > Cc: Huang Rui >> > Cc: Matthew Auld >> > Cc: Maarten Lankhorst >> > Cc: Maxime Ripard >> > Cc: Thomas Zimmermann >> > Cc: David Airlie >> > Cc: Simona Vetter >> > Cc: dri-devel@lists.freedesktop.org >> > Cc: linux-kernel@vger.kernel.org >> > Cc: Thomas Hellström >> > Assisted-by: GitHub_Copilot:claude-haiku-4.5 >> > Signed-off-by: Matthew Brost >> > --- >> > drivers/gpu/drm/xe/Kconfig.profile | 40 ++++++++++++++++++++++++++++++ >> > drivers/gpu/drm/xe/xe_bo.c | 26 +++++++++++++++++++ >> > 2 files changed, 66 insertions(+) >> > >> > diff --git a/drivers/gpu/drm/xe/Kconfig.profile b/drivers/gpu/drm/xe/Kconfig.profile >> > index e07517d120e0..e0aade41f53e 100644 >> > --- a/drivers/gpu/drm/xe/Kconfig.profile >> > +++ b/drivers/gpu/drm/xe/Kconfig.profile >> > @@ -74,3 +74,43 @@ config DRM_XE_ENABLE_SCHEDTIMEOUT_LIMIT >> > to apply to applicable user. For elevated user, all above MIN >> > and MAX values will apply when this configuration is enable to >> > apply limitation. By default limitation is applied. >> > + >> > +config DRM_XE_BO_DEFRAG_RECLAIM_BACKOFF_THRESHOLD >> > + int "BO defrag reclaim backoff threshold" >> > + default 2 >> > + range 1 1000 >> >> Is the value of 1 intended here? As mentioned in patch 16, this will >> reinforce the self backoff loop. >> >> NIT...Also the max value of the range here and below seems too higher >> than the default value. Not sure if that is intended. >> > >This is getting dropped. As I mentioned in other patches I'm changing >this blindly turn off reclaim for all foreground allocations and only >allow the defragmenter to flip on reclaim. This is the desired behavior >for all client systems to avoid missing page flips at all costs. > >> > + help >> > + Once this many BOs are tracked on the device defrag list (i.e. were >> > + backed with a sub-optimal page order), request that the TTM pool backs >> > + off from aggressive reclaim at the beneficial order during populate, >> > + so that allocations make forward progress instead of stalling. >> > + >> > +config DRM_XE_BO_DEFRAG_SIZE_LIMIT >> > + int "Maximum bytes to defrag per work run" >> > + default 33554432 >> > + range 0 1073741824 >> > + help >> > + Maximum number of bytes the defrag worker will process in a single run >> > + before yielding and rescheduling itself. Set to less than large page >> > + size (2M) to disable defrag. A defrag move synchronously reallocates >> > + and re-copies a BO's backing store, which is not free. If a large >> > + number of BOs become eligible at once, processing them all in one >> > + worker run would hold things up for a long, unbounded stretch. >> > + Instead, cap the work done per run and requeue, spreading the defrag >> > + effort out over time. >> > + >> >> The disable mechanism is confusing (0 to 2MB). May be add a separate runtime >> knob for enable/disable and change the range here to start from 2MB? >> > >Ok. > >> > +config DRM_XE_BO_DEFRAG_INTERVAL_MS >> > + int "Default delay before defrag worker run (ms)" >> > + default 25 >> > + range 1 1000 >> > + help >> > + Default delay before (re)running the defrag worker, in milliseconds. >> > + >> > +config DRM_XE_BO_DEFRAG_INTERVAL_MAX_MS >> > + int "Upper bound for defrag worker interval (ms)" >> > + default 15000 >> > + range 100 1000000 >> >> The range here overlaps with that of DRM_XE_BO_DEFRAG_INTERVAL_MS and it >> accepts value lower than that of DRM_XE_BO_DEFRAG_INTERVAL_MS. >> > >It does but there isn't a way Kconfig to enforce this. If someone really >wants to compile with a broken Kconfig, IMO that is a user problem. > Side effect this is, given in patch 20, interval_ms is calculated as, interval_ms = min(INTERVAL_MS * 2, INTERVAL_MAX_MS), the wrong config (INTERVAL_MS > INTERVAL_MAX_MS) ends up scheduling the worker sooner in the first time instead of intended backoff. May be we can assert for such wrong configs in defrag_init_early function as below? xe_assert(xe, XE_BO_DEFRAG_INTERVAL_MS <= XE_BO_DEFRAG_INTERVAL_MAX_MS) Niranjana >> > + help >> > + Upper bound for the (exponentially backed off) defrag worker interval, >> > + in milliseconds, so repeated failures don't push the retry arbitrarily >> > + far out. 15000 ms = 15 seconds. >> > diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c >> > index 073d926ef9ac..0bdd1c920404 100644 >> > --- a/drivers/gpu/drm/xe/xe_bo.c >> > +++ b/drivers/gpu/drm/xe/xe_bo.c >> > @@ -49,7 +49,11 @@ >> > * aggressive reclaim at the beneficial order during populate, so that >> > * allocations make forward progress instead of stalling. >> > */ >> > +#ifdef CONFIG_DRM_XE_BO_DEFRAG_RECLAIM_BACKOFF_THRESHOLD >> > +#define XE_BO_DEFRAG_RECLAIM_BACKOFF_THRESHOLD CONFIG_DRM_XE_BO_DEFRAG_RECLAIM_BACKOFF_THRESHOLD >> > +#else >> > #define XE_BO_DEFRAG_RECLAIM_BACKOFF_THRESHOLD 2 >> > +#endif >> > >> >> Looks like The 'ifdef's are redundent here as the config params without any >> dependency take the default value and hence will always turn out to be true. >> > >This is existing style for everything in Kconfig.profile > >e.g. Look at xe_hw_engine.h > >> > /* >> > * Maximum number of bytes of newly (re)allocated backing the defrag worker will >> > @@ -65,17 +69,31 @@ >> > * Only pages a move truly reallocates are charged; pages harvested from the old >> > * backing are free, so an object larger than the budget is upgraded in >> > * budget-sized slices across runs. >> > + * >> > + * Set to 0 to disable defrag completely. >> > */ >> > +#ifdef CONFIG_DRM_XE_BO_DEFRAG_SIZE_LIMIT >> > +#define XE_BO_DEFRAG_SIZE_LIMIT CONFIG_DRM_XE_BO_DEFRAG_SIZE_LIMIT >> > +#else >> > #define XE_BO_DEFRAG_SIZE_LIMIT SZ_32M >> > +#endif >> > >> > /* Default delay before (re)running the defrag worker, in milliseconds. */ >> > +#ifdef CONFIG_DRM_XE_BO_DEFRAG_INTERVAL_MS >> > +#define XE_BO_DEFRAG_INTERVAL_MS CONFIG_DRM_XE_BO_DEFRAG_INTERVAL_MS >> > +#else >> > #define XE_BO_DEFRAG_INTERVAL_MS 25 >> > +#endif >> > >> > /* >> > * Upper bound for the (exponentially backed off) defrag worker interval, in >> > * milliseconds, so repeated failures don't push the retry arbitrarily far out. >> > */ >> > +#ifdef CONFIG_DRM_XE_BO_DEFRAG_INTERVAL_MAX_MS >> > +#define XE_BO_DEFRAG_INTERVAL_MAX_MS CONFIG_DRM_XE_BO_DEFRAG_INTERVAL_MAX_MS >> > +#else >> > #define XE_BO_DEFRAG_INTERVAL_MAX_MS 15000 /* 15 seconds */ >> > +#endif >> > >> > static void xe_bo_defrag_worker(struct work_struct *w); >> > static void xe_place_from_ttm_type(u32 mem_type, struct ttm_place *place); >> > @@ -1126,6 +1144,7 @@ int xe_bo_defrag_init(struct xe_device *xe) >> > >> > static void xe_bo_defrag_schedule(struct xe_device *xe) >> > { >> > + xe_assert(xe, XE_BO_DEFRAG_SIZE_LIMIT >= SZ_2M); >> > schedule_delayed_work(&xe->mem.defrag.worker, >> > msecs_to_jiffies(xe->mem.defrag.interval_ms)); >> > } >> > @@ -1152,6 +1171,7 @@ static void xe_bo_defrag_add(struct xe_bo *bo) >> > >> > xe_bo_assert_held(bo); >> > xe_assert(xe, xe_bo_needs_defrag(bo)); >> > + xe_assert(xe, XE_BO_DEFRAG_SIZE_LIMIT >= SZ_2M); >> >> xe_bo_defrag_init_early and xe_bo_defrag_init still runs if defrag is >> disabled which can be avoided. >> > >I'd rather not special case the init functions as they are harmless to >run. Also if we switch runtime control of the defragmenter, you'd always >have to call the init. > >Matt > >> Niranjana >> >> > >> > scoped_guard(spinlock, &xe->mem.defrag.lock) { >> > if (list_empty(&bo->defrag_link)) { >> > @@ -1185,6 +1205,9 @@ static void xe_bo_defrag_remove(struct xe_bo *bo) >> > { >> > xe_bo_assert_held(bo); >> > >> > + if (XE_BO_DEFRAG_SIZE_LIMIT < SZ_2M) >> > + return; >> > + >> > if (list_empty(&bo->defrag_link)) >> > return; >> > >> > @@ -1204,6 +1227,9 @@ static void xe_bo_defrag_update(struct xe_bo *bo) >> > { >> > xe_bo_assert_held(bo); >> > >> > + if (XE_BO_DEFRAG_SIZE_LIMIT < SZ_2M) >> > + return; >> > + >> > if (xe_bo_needs_defrag(bo)) >> > xe_bo_defrag_add(bo); >> > else >> > -- >> > 2.34.1 >> >