[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250331103102.22be5363@collabora.com>
Date: Mon, 31 Mar 2025 10:31:02 +0200
From: Boris Brezillon <boris.brezillon@...labora.com>
To: Thomas Zimmermann <tzimmermann@...e.de>
Cc: Adrián Larumbe <adrian.larumbe@...labora.com>, Andrew
Morton <akpm@...ux-foundation.org>, Maarten Lankhorst
<maarten.lankhorst@...ux.intel.com>, Maxime Ripard <mripard@...nel.org>,
David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>, Rob
Herring <robh@...nel.org>, Steven Price <steven.price@....com>, Liviu Dudau
<liviu.dudau@....com>, kernel@...labora.com, linux-kernel@...r.kernel.org,
dri-devel@...ts.freedesktop.org
Subject: Re: [RFC PATCH v2 0/6] Introduce sparse DRM shmem object
allocations
Hi Thomas,
On Mon, 31 Mar 2025 09:13:59 +0200
Thomas Zimmermann <tzimmermann@...e.de> wrote:
> Hi
>
> Am 26.03.25 um 03:14 schrieb Adrián Larumbe:
> > This patch series is a proposal for implementing sparse page allocations
> > for shmem objects. It was initially motivated by a kind of BO managed by
> > the Panfrost driver, the tiler heap, which grows on demand every time the
> > GPU faults on a virtual address within its drm_mm-managed ranged.
>
> I've looked at panfrost_gem.h and found that the driver's gem structure
> has grown quite a bit. It seems to have outgrown gem-shmem already. I
> think you should consider pulling a copy of gem-shmem into the driver
> and building a dedicated memory manager on top.
Actually, it's not just something we need for panfrost. I plan to use
the same non-blocking allocation mechanism for panthor's heap
chunks/buffers, and lima could use it for its heap buffers too. The
non-blocking page allocation is also something i915 has been
open-coding here [1], and I believe that some of this logic could
(and should IMHO) live in common code rather than each driver coming
with its own solution, thus increasing the risk of bugs/inconsistencies.
That's even more important if we provide a common gem-shmem shrinker
like Dmitry's has been proposing.
Best Regards,
Boris
[1]https://elixir.bootlin.com/linux/v6.13.7/source/drivers/gpu/drm/i915/gem/i915_gem_shmem.c#L89
Powered by blists - more mailing lists