From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f171.google.com (mail-qk1-f171.google.com [209.85.222.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B74092FF661 for ; Thu, 29 Jan 2026 14:58:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769698735; cv=none; b=XYwrIl6iQNSDCICHdvZX88dYmfnwkTCkS7oqtLvYNRNWhIvEXf+KKBujJmQUH4kx+DiMUisA1ORspI+QGNcdromNCss/xGQNDCbj8HdY/Rq7R9+vJuanCH0a26RpVqdE04fd4MtIlu+tY1mMYdINOgAftDw/BVCIfLDBSyiKLL8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769698735; c=relaxed/simple; bh=K929Qe1UqCZl76ieO2aMPpP3RDbZ+XEIE24yDLHrmkk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=nzECF/WfiqpixoAsEKSxwW2MnK4miNrrSWzVV5vvd31dLX2u5D1VsRejrL7TBFuboxk4rvXOuxrnn+gTRbAX5CWXnLN0FCkkmpG8eX3wcc/qIxF/wtWqgI4LfgfRXZ5Kgxys6MQGN6gqMGUTvbblsqWH5giqc2cKz5IP982skKs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca; spf=pass smtp.mailfrom=ziepe.ca; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b=Vv/672/s; arc=none smtp.client-ip=209.85.222.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="Vv/672/s" Received: by mail-qk1-f171.google.com with SMTP id af79cd13be357-8c530866cf0so109493785a.1 for ; Thu, 29 Jan 2026 06:58:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1769698733; x=1770303533; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=o4w2e3JsR9J6c+UOY9xxx12hv3SNlcI3MEz/ixg8Unk=; b=Vv/672/s8xBCHgxjq9LZBCAxet4jeR/CrpWOyGRXzO+uVCKSlDLDklZFsaQLQ72QjB svqWLOG5aU9GL3y3XaJ/9z7igiVcCX0agb0OOzQjQt49nrHbbeIdmwsd1dujDeYgF6kg ERpr7lewIw/eU8trh3RfQC9ClBuKQsyG/q8uhcnJ65p+f0TntHfaCUwBR6PlRM9x+rtz j+uTJyk/C1forQFvrgIW2Ex4xSCDmwAoD8PrfXYvac67fu5vgqXb0DXJWrTYBuKGrI1o 9KErYnxlwzN1M5HAXJx+o5p6yP+4AaxYWGVmCHnzUBIPlZ59NiL/PUKQUHlNWE1TyrkX 3EwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769698733; x=1770303533; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=o4w2e3JsR9J6c+UOY9xxx12hv3SNlcI3MEz/ixg8Unk=; b=C0xxayTPaP8eOLp5Qy6W2mhEPTiaqF9NgsqJkjp9+rkm2GwhRzJBJrxLFWOWYOY0PX agqBWFxM3re0ZcjnOE0TxSp87SucUJF8do/2xLvt2ITWHE17QikwtwLzT2vjjItv2v7A XrjsVWAl0zxQ+pM0VmaENmVvzUN3CsBzorLzZxckG9TnsF/laYXQBw89RlsdWMEeFG+v wXbqdPuwEi20RbOHtD1tN1esDUCCOmw+N/Q/N26lQsKq5Hu7ufsGnhn3yxvL03sNC3ZU nGHYLU1b5i8uVZzFuKiLlG3AiqoY82x/IhdQMaUFjZHEzCXMLGKnqlhI7Okq6AUfw463 1c/g== X-Forwarded-Encrypted: i=1; AJvYcCVGX9H5ItXdso3nG1g1ld6VuclDxMUqL1MXSevxnP1ZJJJR/xx6PTESJ8kW03XcgT7NgT0HNs2oSsGHsho=@vger.kernel.org X-Gm-Message-State: AOJu0YygaiHDIzGYgZqNjpQYx3WTRDxKHCRgVmcGa2a9PoNqOg5Hi02b 2FFKZSlQjwdaB22XC2J0VUb7KlYy7+Yb7EfjWDa0WpNThRc6+UoNmd2CNztQt03n0h4= X-Gm-Gg: AZuq6aIQ9Q958YqfXHT4nS8NAm3cgErzO21S4FCrUYyXXavyh72/yxn/6Brf/myOmTq JFylrlUKRaHX6ZPFelYyDjwcp2lUX89ghRkazKhuKRPcKddsq1pLnlZ5yvd24ccuX31/heRnLg5 mhS8vZ7mpJ9MmdbnBKQp8+gtMK/YK7maxWjbYdYklx7ocXLlryTlDGtiNvPton+WwjSBah2UEEj JVZwdVe6U9lM0UCxOumpMMKryVtSbWT/6Ob5GtSzWDjhfDI6dGV75R4sQNrZGfbr/qs6xGl9gTW MqWkA4rFxKOhFAXnUVZ+Z/KaMr3d08l2g4wEygTWEe7NjfjcA28l4Tnut+CloeDlZA9Qr8AAPW7 4Qu2JdRSmQj6Kd23TFszcqJ+UM/+61CztYBs3janFd3r1z6RnHwQJPtZ68OAYJiNWohzjBhgqLP cbrLdFzKu79JnZ/NzT62Jy+VDEsVsJBG7bbT/P1faY7Cw9hO29jyx5mFgjILFnqphUblQ= X-Received: by 2002:a05:620a:2550:b0:8c6:d398:4a76 with SMTP id af79cd13be357-8c70b833da6mr1225384185a.2.1769698732651; Thu, 29 Jan 2026 06:58:52 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-142-162-112-119.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.112.119]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-894d375c0d8sm38242676d6.43.2026.01.29.06.58.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Jan 2026 06:58:52 -0800 (PST) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1vlTTv-00000009kfJ-363L; Thu, 29 Jan 2026 10:58:51 -0400 Date: Thu, 29 Jan 2026 10:58:51 -0400 From: Jason Gunthorpe To: "Tian, Kevin" Cc: Leon Romanovsky , Pranjal Shrivastava , Sumit Semwal , Christian =?utf-8?B?S8O2bmln?= , Alex Deucher , David Airlie , Simona Vetter , Gerd Hoffmann , Dmitry Osipenko , Gurchetan Singh , Chia-I Wu , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Lucas De Marchi , Thomas =?utf-8?Q?Hellstr=C3=B6m?= , "Vivi, Rodrigo" , Joerg Roedel , Will Deacon , Robin Murphy , Felix Kuehling , Alex Williamson , Ankit Agrawal , "Kasireddy, Vivek" , "linux-media@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "linaro-mm-sig@lists.linaro.org" , "linux-kernel@vger.kernel.org" , "amd-gfx@lists.freedesktop.org" , "virtualization@lists.linux.dev" , "intel-xe@lists.freedesktop.org" , "linux-rdma@vger.kernel.org" , "iommu@lists.linux.dev" , "kvm@vger.kernel.org" Subject: Re: [PATCH v5 4/8] vfio: Wait for dma-buf invalidation to complete Message-ID: <20260129145851.GE2307128@ziepe.ca> References: <20260124-dmabuf-revoke-v5-0-f98fca917e96@nvidia.com> <20260124-dmabuf-revoke-v5-4-f98fca917e96@nvidia.com> <20260127085835.GQ13967@unreal> <20260127162754.GH1641016@ziepe.ca> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Jan 29, 2026 at 07:06:37AM +0000, Tian, Kevin wrote: > Bear me if it's an ignorant question. > > The commit msg of patch6 says that VFIO doesn't tolerate unbounded > wait, which is the reason behind the 2nd timeout wait here. As far as I understand dmabuf design a fence wait should complete eventually under kernel control, because these sleeps are sprinkled all around the kernel today. I suspect that is not actually true for every HW, probably something like "shader programs can run forever technically". We can argue if those cases should not report revocable either, but at least this will work "correctly" even if it takes a huge amount of time. I wouldn't mind seeing a shorter timeout and print on the fence too just in case. Jason