From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 23F1C4949EB for ; Wed, 13 May 2026 16:16:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778689016; cv=none; b=cvUflTSTfEfGpubyBs3K6vOAJDUyNqUmw3skm4IKH550OwmwiLlEiISYVBiTdWJQrK9Y9oyGindP0Q+gq4CP/iDMY32Q/3LqxrykZ99XEs5R1TGC6KYUaGmUknjpQS6JHLwcnAKdr9Y0m28Ov5ABw5DVfOUXkQge6VQ4J9qcZ5k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778689016; c=relaxed/simple; bh=ZflAobmezTMyxUcMZaRJFQwRT+gnDZ32d7ahzROvR0A=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=RiPSleGXQ+Fxwo3wmswPCxKSCvCnM3TKsvO4RYEd7tZzQbFb4sGVuxjSSM7kpOPp0xwsxBa3QNLg3FCE7+ihme6kzoVWSjYajA08T8qDMio++6qKt/DVcouVfwRJOTwfRru3f1zKvEAreNzUnrdozXzfoSdsILCmye+pOlopKbU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=gMRCAAIT; arc=none smtp.client-ip=148.251.105.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="gMRCAAIT" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1778689013; bh=ZflAobmezTMyxUcMZaRJFQwRT+gnDZ32d7ahzROvR0A=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=gMRCAAIT4rdyq829nUeI1ubFGyPIFW4OyAoGc2ynbP2ly1jWd4HscjXP4Z9KUKdS8 hALCDUAEJTtFY8hvbK9ZR1T6BajRUApPpKYPog3iVOvzluHuDI0XKvJE9W4bfND0Ue 9jXyd9277+bzydOL6PWod56sGPqFgqfryRn21wzXWnPUrGF8KweE1decTdV3jEnfij INecwqtBIQR3/J+7S53CaJQ+7Itwj8zXuWfcKnskz6ym5teOZoe8FoEUZ3fbJVkhZ6 M6U4A9zpDB4Keaouk8nhZ2KBJMiac04NlFYVSuCvkNw82pGXYUwsvefwHHEIhDutTu BNwnQyhASyaGA== Received: from fedora (unknown [100.64.0.11]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bbrezillon) by bali.collaboradmins.com (Postfix) with ESMTPSA id C60B517E05FC; Wed, 13 May 2026 18:16:52 +0200 (CEST) Date: Wed, 13 May 2026 18:16:49 +0200 From: Boris Brezillon To: Steven Price Cc: =?UTF-8?B?QWRyacOhbg==?= Larumbe , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, kernel@collabora.com, Liviu Dudau , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Daniel Almeida , Alice Ryhl Subject: Re: [PATCH v11 5/6] drm/panthor: Support sparse mappings Message-ID: <20260513181649.44f50753@fedora> In-Reply-To: <661a6aab-a643-496b-94d2-ae9230df1a54@arm.com> References: <20260507214939.2852489-1-adrian.larumbe@collabora.com> <20260507214939.2852489-6-adrian.larumbe@collabora.com> <661a6aab-a643-496b-94d2-ae9230df1a54@arm.com> Organization: Collabora X-Mailer: Claws Mail 4.4.0 (GTK 3.24.52; x86_64-redhat-linux-gnu) 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=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, 13 May 2026 16:46:17 +0100 Steven Price wrote: > On 07/05/2026 22:49, Adri=C3=A1n Larumbe wrote: > > Allow UM to bind sparsely populated memory regions by cyclically mapping > > virtual ranges over a kernel-allocated dummy BO. This alternative is > > preferable to the old method of handling sparseness in the UMD, because= it > > relied on the creation of a buffer object to the same end, despite the = fact > > Vulkan sparse resources don't need to be backed by a driver BO. > >=20 > > The choice of backing sparsely-bound regions with a Panthor BO was made= so > > as to profit from the existing shrinker reclaim code. That way no speci= al > > treatment must be given to the dummy sparse BOs when reclaiming memory,= as > > would be the case if we had chosen a raw kernel page implementation. =20 >=20 > Do you need to fix up the remap_evicted_vma() path though? At the moment > that will go through panthor_vm_map_pages() without doing the > panthor_fix_sparse_map_offset() dance. Also I suspect it won't map the > whole region (just the first 2MB in the sgtable). >=20 > Maybe I'm missing something? Nope, you're right, we definitely need to special-case sparse-mappings in the remap_evicted_vma() path.