[PATCH v2 6/9] i915: Use writeback_iter()
Matthew Wilcox
willy at infradead.org
Fri Apr 4 13:40:19 UTC 2025
On Fri, Apr 04, 2025 at 01:26:29AM -0700, Christoph Hellwig wrote:
> On Wed, Apr 02, 2025 at 04:00:00PM +0100, Matthew Wilcox (Oracle) wrote:
> > Convert from an inefficient loop to the standard writeback iterator.
>
> Not for this patch but a follow on: we really need to improve the
> abstraction for using shmem for driver a bit. Drivers implementing
> their own writeback_iter based loop is a bad idea. Instead the
> code here in __shmem_writeback and the similar version in ttm need to
> be consolidated into a nicely abstracted highlevel API in shmem.c.
>
> Similarly for the mess these drivers cause by calling into the
> write_begin and write_end aops.
Yes, I agree, we need an API for "I want to use some pagable memory"
that's almost certainly built on shmem but doesn't expose nearly as much
of the innards of shmem as this does. I've been vaguely thinking about
what that might look like ever since Darrick came up with xfile for xfs
online scrub. The GPUs have similar requirements, so that's three users.
I don't have anything concrete to talk about yet.
More information about the dri-devel
mailing list