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 13683D65537 for ; Tue, 26 Nov 2024 17:48:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C7AC310E1D2; Tue, 26 Nov 2024 17:48:49 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="a637WLAd"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) by gabe.freedesktop.org (Postfix) with ESMTPS id E6DAF10E19F; Tue, 26 Nov 2024 17:48:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1732643328; x=1764179328; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=ykes25MpEqeVZH8fXAeTPllwMy6wRSXefgtJtBC8JXA=; b=a637WLAdZ2T8tT1nB4xZZONncjxcLm6iVZdI3mr8tcBVAavi8zCTshV+ Z3+sN2lp3Z3hQ1o5OiOkt8dPAS7NiXNqDi22ibn/hxmwDMEBXZOjWENRb sAY9ZRH4JHcbA83gXuu6uJGKEIcHs2r+z/DAZ/7JNwuMIV4t4nAdRQ+7Q 1uoPkCYG5ae8/jdTx1FDQTHp7hX/pZaKs2B5TldWxvI3FaSy5TyToZWVW 19C18/cBJP/t9LDB1T1FUzI0Ae+PH3vy5VhjAZAmV7GiBDNsr6xq3r1nv /vSXnw/+O+7Tq7EG7vY6PrnedBDN9hVopKf5vzxTnTQSGeIgvQ5Frx+8z w==; X-CSE-ConnectionGUID: 7W8jVxM2Seio7Er5HwHncg== X-CSE-MsgGUID: +E7bshZ2R9+z7me3Ulhc6g== X-IronPort-AV: E=McAfee;i="6700,10204,11268"; a="43480518" X-IronPort-AV: E=Sophos;i="6.12,186,1728975600"; d="scan'208";a="43480518" Received: from fmviesa008.fm.intel.com ([10.60.135.148]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Nov 2024 09:48:47 -0800 X-CSE-ConnectionGUID: SWMlzdMPS3G/zh+rGz8piQ== X-CSE-MsgGUID: v0yYP8kjSnCze39dvtVA8Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,186,1728975600"; d="scan'208";a="91850865" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by fmviesa008.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 26 Nov 2024 09:48:48 -0800 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) 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; Tue, 26 Nov 2024 09:48:47 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) 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 via Frontend Transport; Tue, 26 Nov 2024 09:48:47 -0800 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.44) 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; Tue, 26 Nov 2024 09:48:46 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=moblZK4BwH/Mi5SkSMC6M2P93SIqHdqGW/8wUToUyMiz6xefyGlohKTucL5Za177trQAmSMddwAMn38qsZ4o2VlKAc7SoLrRvTR8IBbXdRRtSkRpE0KYXDui2zEpIiF/uJoWWymVNzf6OI+RQhgGu+neP8Kywjx33BeYLo2/N883RyI0+iCXpp5S/S9oIgvyL1/D3CY1e98OnzRMMPpOig+zQUC59bYxph/sQAexZPRwj1HfHeOXWiqapkpThU5VMnQaBYoQA7j+IMVSnmws9mdhdW5YInyLC19pjCiUCaTRbWFMfysFu5Ja+uTDkCeG9nc0f8hgzI+j7GT8lSpYHg== 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=WeR7C6eSaVSLNLK/jLFYrhPf964f/ayiabwMGJ1Ujgk=; b=tTowMRlu4Ligw60UwnPppgyT4xG3FyduLYtEvALnJXvlPHg9+DcK89sru63QjspecYwglfv/EVNYkKW9JnUs5U+JQi2TuY84AcjRuCtkWgzSziPX+JVzIlZl6f0rWg5dUCi8EH8QSW+RNZWi4j0auXklj0ZAyP6FaQnCAj0e0IjpfBDH1mEf4MnkX/1WB9w7ZY9g/SZQn0XW/FcPXsRDWE7BmvbJCiTvLk63LztO+2WQaOQM5Glc2NHyqJgLD7xxP4gUSJDoeUDRIu/CaIufjdwthtKkKUFixkwLBCj0JW2gJ12+cqnSVgEdUud7Svkzdm0L5rQIB5/TtfWnStW6Lw== 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 SA1PR11MB6821.namprd11.prod.outlook.com (2603:10b6:806:29d::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.21; Tue, 26 Nov 2024 17:48:43 +0000 Received: from PH7PR11MB6522.namprd11.prod.outlook.com ([fe80::9e94:e21f:e11a:332]) by PH7PR11MB6522.namprd11.prod.outlook.com ([fe80::9e94:e21f:e11a:332%4]) with mapi id 15.20.8182.019; Tue, 26 Nov 2024 17:48:43 +0000 Date: Tue, 26 Nov 2024 09:49:20 -0800 From: Matthew Brost To: Christian =?iso-8859-1?Q?K=F6nig?= CC: Christian =?iso-8859-1?Q?K=F6nig?= , Thomas =?iso-8859-1?Q?Hellstr=F6m?= , "Joonas Lahtinen" , Simona Vetter , Rodrigo Vivi , Huang Rui , , , , David Airlie , Simona Vetter Subject: Re: [PATCH v6 2/8] drm/ttm: Add ttm_bo_access Message-ID: References: <6ab9e754-6f4a-48ec-b143-02585bc40291@amd.com> <5a16ef4ff06a530c52df7633833db19aaa15b33e.camel@linux.intel.com> <8d17a8a2-9a44-4f80-92b5-a8aa3efe6bf2@amd.com> <634b07dd-aa5a-410e-8f62-0a96567c7932@amd.com> <18681d07-beb4-41c5-a935-11b8ec231c27@gmail.com> Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <18681d07-beb4-41c5-a935-11b8ec231c27@gmail.com> X-ClientProxiedBy: BYAPR21CA0011.namprd21.prod.outlook.com (2603:10b6:a03:114::21) To PH7PR11MB6522.namprd11.prod.outlook.com (2603:10b6:510:212::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH7PR11MB6522:EE_|SA1PR11MB6821:EE_ X-MS-Office365-Filtering-Correlation-Id: 6c3150f4-52b5-4962-6f02-08dd0e4291ce X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|1800799024|366016; X-Microsoft-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Z1CCKfQoS1JN0fG7Fs2eVP/H91kgrICt4dBGQkWpix?= =?iso-8859-1?Q?FlKfy4I8MA7rwHxegSBKQEIcTa1hVf8iwm+/voYN+Sh5KbAeX0bWbWdYP3?= =?iso-8859-1?Q?2S2cpe7rBWGDeK0+hiR8WyQPlX13t7bPAjm7xZ4BGAUlZrwhOHGJj/IAkg?= =?iso-8859-1?Q?pYzYfyl07MIELYB7hDOQ7/GR6xGBLfA9M829m56SY0UlwTDrUpvQwDHArY?= =?iso-8859-1?Q?R7no8VFUt/nvmCPdeXmp9J7EkhNC0dxpIEqPrVefq3x1+hsS01B+LJy8J/?= =?iso-8859-1?Q?W/XVE/7j40lMtUfQooKPk3Js5kj78Y43CH7UcUafBa014CRkSGSmngh+9P?= =?iso-8859-1?Q?Rjjb7VhGPTuoQoxH4hy8eI5Yv1+D8CGxdbPlyMPVJoru7PEp181f94vCt0?= =?iso-8859-1?Q?WAosbWLR6c/NMx8b+8Cwvgdp3UK2eNHvxqgAaNuy1zyMHxcHf9vmkq90ZN?= =?iso-8859-1?Q?FrWiKYxuyFO7dAPSXxNnPLt5Ex2sd1xAZNY8J3dYef3UwTzSXM+Pa8BFfx?= =?iso-8859-1?Q?KVEE9Yn5hPj8igYRNnYVaHq+Yhb3g0bw=3D=3D?= 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)(376014)(7416014)(1800799024)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-1?Q?QdNJ2WdV33CbE6n3tCVeUv9BKuJBVHX4UXvt9fsc+C5zLlnUylVyxCTIzo?= =?iso-8859-1?Q?DMCmrRpiMe8vGye6Z/FXTaU6OvT1P3ceZM2DQT9j33JgyzH5MIwc6bunnY?= =?iso-8859-1?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C6iwuU+J5qBMVayw71MEbNC5xKxOnOT0FK/1AEI?= =?iso-8859-1?Q?WkDVpwrvMpZ9W08iq04G9aJoMYuS6rd4FMVNt79bRTrkxH3mjDWFbNjZ3A?= =?iso-8859-1?Q?t6m6YIJi6UKhJPnwVUglJf/lFgxVJ8BSEB6Z6sv1xpvCp5A0h0J/n7JNMy?= =?iso-8859-1?Q?Ucf7WHSQsIQ013ZjH+k6/fQWUVGJgCtYLgFrUr0m4qlXvDu2P24ZPcatep?= =?iso-8859-1?Q?G8HiDieyMkascDxt2iBjl+pxT+hEKWKuKpFPRTrc26HE8JMIHD7gifLbO2?= =?iso-8859-1?Q?cxJs5ShzzumPPNt7b5jMCyB0XclUThG3sjEehK9SH+xYSGtNvN7jCfADcO?= =?iso-8859-1?Q?8N7IX9e/l7d2Pkf/1uH5hMTDNVuiblVybFlX8cVO0/vA9X2Br4scwxlfoa?= =?iso-8859-1?Q?uuLuOUcwyiC4tuMfW+djsixjk9EDkFMSQ+seRq9dZVBbHOsCt2TW6AYIpV?= =?iso-8859-1?Q?hEqA5faUu2JR8A8EjoIXsGS6RsgC2SZKrLaXweSp7VMsKlwkRwe3sjGr53?= =?iso-8859-1?Q?3GLHobspR9pwHZ3YcpbeehAR+hJONYNn8FasAAchwO44m6eNpB72ng4/k+?= =?iso-8859-1?Q?JCgf0mxncR0YLigf3UVBO1e8Mi7+ogf1dUMEpjT3F76VoBUZHrm+rXvbRt?= =?iso-8859-1?Q?WYxiwcjnLEhLdJWaK4TpVZvyjP2edfgBmbMle7ndY957/KV0CWuW8v0w?= =?iso-8859-1?Q?=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 6c3150f4-52b5-4962-6f02-08dd0e4291ce X-MS-Exchange-CrossTenant-AuthSource: PH7PR11MB6522.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2024 17:48:43.5937 (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: WdXGFKCF0cLQH4UpO2X5sGBH5g0jpNBjQLv4ahrKy9Yy/Jz2GheGl0UF16JjACBdzrB0pDiK+IXa8nuISc+smA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR11MB6821 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 Tue, Nov 26, 2024 at 09:19:47AM +0100, Christian König wrote: > Am 25.11.24 um 18:27 schrieb Matthew Brost: > > On Mon, Nov 25, 2024 at 05:19:54PM +0100, Christian König wrote: > > > Am 25.11.24 um 16:29 schrieb Matthew Brost: > > > > On Fri, Nov 15, 2024 at 10:27:59AM -0800, Matthew Brost wrote: > > > > > [SNIP] > > > > > We use this interface to read a BO marked with a dumpable flag during a > > > > > GPU hang in our error capture code. This is an internal KMD feature, not > > > > > directly exposed to user space. Would adding this helper be acceptable > > > > > for this use case? I can add kernel indicating the current restrictions > > > > > of the helper (do not directly expose to user space) too if that would > > > > > help. > > > > > > > > > Christian - ping on above. > > > Sorry, I will try to give those mailing list tasks a bit more time in before > > > the xmas holidays. > > > > > > That is an acceptable use case, but the problem is that this helper won't > > > work for that. > > > > > > See during a GPU hang you can't lock BOs, so how do you want to look into > > > their content with the peek helper? > > > > > Agree we cannot lock BO directly in GPU hang path (TDR). Our error > > capture code takes a snapshot of some the GPU state which is small and > > safe to capture in TDR and kicks a worker which opportunistically > > captures the VM state which has been marked to be captured. This is > > where the helper is called and it is safe to lock the BO. > > Yeah that sounds like it should work. > > No objections from my side for that use case, but I would rather like to > keep the code inside ttm_bo_vm.c. > Thanks, reposted with code inside ttm_bo_vm.c. Any objection to merging entire series through drm-xe-next and then backporting single TTM patch drm-misc-next? Matt > Crash dumping is usually something associated with the VMA even if it's a > bit special here for the VM state. > > Regards, > Christian. > > > > > Matt > > > > > The only thing you could potentially do is to trylock the BO and then dump, > > > but that would most likely be a bit unreliable. > > > > > > Regards, > > > Christian. > > > > > > > > Matt >