[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <69f7bdc1-e2e2-4a0c-94be-b096a4de218b@igalia.com>
Date: Mon, 1 Dec 2025 10:16:26 -0300
From: Maíra Canal <mcanal@...lia.com>
To: Loïc Molinari <loic.molinari@...labora.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
Jani Nikula <jani.nikula@...ux.intel.com>,
Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@...el.com>, Tvrtko Ursulin
<tursulin@...ulin.net>, Boris Brezillon <boris.brezillon@...labora.com>,
Rob Herring <robh@...nel.org>, Steven Price <steven.price@....com>,
Liviu Dudau <liviu.dudau@....com>, Melissa Wen <mwen@...lia.com>,
Hugh Dickins <hughd@...gle.com>, Baolin Wang
<baolin.wang@...ux.alibaba.com>, Andrew Morton <akpm@...ux-foundation.org>,
Al Viro <viro@...iv.linux.org.uk>, Mikołaj Wasiak
<mikolaj.wasiak@...el.com>, Christian Brauner <brauner@...nel.org>,
Nitin Gote <nitin.r.gote@...el.com>, Andi Shyti
<andi.shyti@...ux.intel.com>, Jonathan Corbet <corbet@....net>,
Christopher Healy <healych@...zon.com>, Matthew Wilcox
<willy@...radead.org>, Bagas Sanjaya <bagasdotme@...il.com>
Cc: linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
intel-gfx@...ts.freedesktop.org, linux-mm@...ck.org,
linux-doc@...r.kernel.org, kernel@...labora.com
Subject: Re: [PATCH v10 06/10] drm/v3d: Use huge tmpfs mountpoint helpers
Hi Loïc,
On 28/11/25 15:52, Loïc Molinari wrote:
> Make use of the new drm_gem_huge_mnt_create() and
> drm_gem_get_huge_mnt() helpers to avoid code duplication. Now that
> it's just a few lines long, the single function in v3d_gemfs.c is
> moved into v3d_gem.c.
>
> v3:
> - use huge tmpfs mountpoint in drm_device
> - move v3d_gemfs.c into v3d_gem.c
>
> v4:
> - clean up mountpoint creation error handling
>
> v5:
> - fix CONFIG_TRANSPARENT_HUGEPAGE check
> - use drm_gem_has_huge_mnt() helper
>
> v8:
> - don't access huge_mnt field with CONFIG_TRANSPARENT_HUGEPAGE=n
>
> v9:
> - replace drm_gem_has_huge_mnt() by drm_gem_get_huge_mnt()
>
> v10:
> - get rid of CONFIG_TRANSPARENT_HUGEPAGE ifdefs
>
> Signed-off-by: Loïc Molinari <loic.molinari@...labora.com>
Reviewed-by: Maíra Canal <mcanal@...lia.com>
With one suggestion below:
> ---
> drivers/gpu/drm/v3d/Makefile | 3 +-
> drivers/gpu/drm/v3d/v3d_bo.c | 5 ++-
> drivers/gpu/drm/v3d/v3d_drv.c | 2 +-
> drivers/gpu/drm/v3d/v3d_drv.h | 11 +-----
> drivers/gpu/drm/v3d/v3d_gem.c | 27 ++++++++++++--
> drivers/gpu/drm/v3d/v3d_gemfs.c | 62 ---------------------------------
> 6 files changed, 30 insertions(+), 80 deletions(-)
> delete mode 100644 drivers/gpu/drm/v3d/v3d_gemfs.c
>
[...]
> diff --git a/drivers/gpu/drm/v3d/v3d_gem.c b/drivers/gpu/drm/v3d/v3d_gem.c
> index 5a180dc6c452..62532a89dd14 100644
> --- a/drivers/gpu/drm/v3d/v3d_gem.c
> +++ b/drivers/gpu/drm/v3d/v3d_gem.c
> @@ -259,6 +259,30 @@ v3d_invalidate_caches(struct v3d_dev *v3d)
> v3d_invalidate_slices(v3d, 0);
> }
>
> +static void
> +v3d_huge_mnt_init(struct v3d_dev *v3d)
> +{
> + int err = 0;
> +
> + /*
> + * By using a huge shmemfs mountpoint when the user wants to
> + * enable Super Pages, we can pass in mount flags that better
> + * match our usecase.
> + */
I feel that this comment is phrased in a way that isn’t very clear. If
possible, could you rephrase it or remove it? I think this comment is
no longer needed given all the documentation already added to the
DRM GEM functions.
Best Regards,
- Maíra
> +
> + if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE) && super_pages)
> + err = drm_gem_huge_mnt_create(&v3d->drm, "within_size");
> +
> + if (drm_gem_get_huge_mnt(&v3d->drm))
> + drm_info(&v3d->drm, "Using Transparent Hugepages\n");
> + else if (err)
> + drm_warn(&v3d->drm, "Can't use Transparent Hugepages (%d)\n",
> + err);
> + else
> + drm_notice(&v3d->drm,
> + "Transparent Hugepage support is recommended for optimal performance on this platform!\n");
> +}
> +
Powered by blists - more mailing lists