[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250728144424.208d58d5a95057ee7081ccd8@linux-foundation.org>
Date: Mon, 28 Jul 2025 14:44:24 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Baolin Wang <baolin.wang@...ux.alibaba.com>
Cc: hughd@...gle.com, patryk@...alczyk.ws, ville.syrjala@...ux.intel.com,
david@...hat.com, willy@...radead.org, maarten.lankhorst@...ux.intel.com,
mripard@...nel.org, tzimmermann@...e.de, airlied@...il.com,
simona@...ll.ch, jani.nikula@...ux.intel.com,
joonas.lahtinen@...ux.intel.com, rodrigo.vivi@...el.com,
tursulin@...ulin.net, christian.koenig@....com, ray.huang@....com,
matthew.auld@...el.com, matthew.brost@...el.com,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Subject: Re: [PATCH] mm: shmem: fix the shmem large folio allocation for the
i915 driver
On Mon, 28 Jul 2025 16:03:53 +0800 Baolin Wang <baolin.wang@...ux.alibaba.com> wrote:
> After commit acd7ccb284b8 ("mm: shmem: add large folio support for tmpfs"),
> we extend the 'huge=' option to allow any sized large folios for tmpfs,
> which means tmpfs will allow getting a highest order hint based on the size
> of write() and fallocate() paths, and then will try each allowable large order.
>
> However, when the i915 driver allocates shmem memory, it doesn't provide hint
> information about the size of the large folio to be allocated, resulting in
> the inability to allocate PMD-sized shmem, which in turn affects GPU performance.
>
> To fix this issue, add the 'end' information for shmem_read_folio_gfp() to help
> allocate PMD-sized large folios. Additionally, use the maximum allocation chunk
> (via mapping_max_folio_size()) to determine the size of the large folios to
> allocate in the i915 driver.
What is the magnitude of the performance change?
> Fixes: acd7ccb284b8 ("mm: shmem: add large folio support for tmpfs")
> Reported-by: Patryk Kowalczyk <patryk@...alczyk.ws>
> Reported-by: Ville Syrjälä <ville.syrjala@...ux.intel.com>
> Tested-by: Patryk Kowalczyk <patryk@...alczyk.ws>
This isn't a regression fix, is it? acd7ccb284b8 adds a new feature
and we have now found a flaw in it.
Still, we could bend the rules a little bit and backport this, depends
on how significant the runtime effect is.
Powered by blists - more mailing lists