From: "Loïc Molinari" <loic.molinari@collabora.com>
To: Boris Brezillon <boris.brezillon@collabora.com>,
kernel test robot <lkp@intel.com>
Cc: "Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Jani Nikula" <jani.nikula@linux.intel.com>,
"Joonas Lahtinen" <joonas.lahtinen@linux.intel.com>,
"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
"Tvrtko Ursulin" <tursulin@ursulin.net>,
"Boris Brezillon" <bbrezillon@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Steven Price" <steven.price@arm.com>,
"Liviu Dudau" <liviu.dudau@arm.com>,
"Melissa Wen" <mwen@igalia.com>,
"Maíra Canal" <mcanal@igalia.com>,
"Hugh Dickins" <hughd@google.com>,
"Baolin Wang" <baolin.wang@linux.alibaba.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Al Viro" <viro@zeniv.linux.org.uk>,
"Christian Brauner" <brauner@kernel.org>,
"Nitin Gote" <nitin.r.gote@intel.com>,
"Andi Shyti" <andi.shyti@linux.intel.com>,
"Jonathan Corbet" <corbet@lwn.net>,
"Christopher Healy" <healych@amazon.com>,
"Matthew Wilcox" <willy@infradead.org>,
"Bagas Sanjaya" <bagasdotme@gmail.com>,
oe-kbuild-all@lists.linux.dev,
"Linux Memory Management List" <linux-mm@kvack.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 06/12] drm/i915: Use huge tmpfs mountpoint helpers
Date: Wed, 22 Oct 2025 10:28:04 +0200 [thread overview]
Message-ID: <64040015-2840-4210-8019-a39e605d87a0@collabora.com> (raw)
In-Reply-To: <20251022100548.4dee241e@fedora>
Hi Boris,
On 22/10/2025 10:05, Boris Brezillon wrote:
> On Wed, 22 Oct 2025 11:25:10 +0800
> kernel test robot <lkp@intel.com> wrote:
>
>> Hi Loïc,
>>
>> kernel test robot noticed the following build errors:
>>
>> [auto build test ERROR on next-20251021]
>> [also build test ERROR on v6.18-rc2]
>> [cannot apply to akpm-mm/mm-everything drm-misc/drm-misc-next linus/master v6.18-rc2 v6.18-rc1 v6.17]
>> [If your patch is applied to the wrong git tree, kindly drop us a note.
>> And when submitting patch, we suggest to use '--base' as documented in
>> https://git-scm.com/docs/git-format-patch#_base_tree_information]
>>
>> url: https://github.com/intel-lab-lkp/linux/commits/Lo-c-Molinari/drm-shmem-helper-Simplify-page-offset-calculation-in-fault-handler/20251021-193355
>> base: next-20251021
>> patch link: https://lore.kernel.org/r/20251021113049.17242-7-loic.molinari%40collabora.com
>> patch subject: [PATCH v5 06/12] drm/i915: Use huge tmpfs mountpoint helpers
>> config: x86_64-randconfig-003-20251022 (https://download.01.org/0day-ci/archive/20251022/202510221301.wU3TSqMg-lkp@intel.com/config)
>> compiler: gcc-13 (Debian 13.3.0-16) 13.3.0
>> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251022/202510221301.wU3TSqMg-lkp@intel.com/reproduce)
>>
>> If you fix the issue in a separate patch/commit (i.e. not just a new version of
>> the same patch/commit), kindly add following tags
>> | Reported-by: kernel test robot <lkp@intel.com>
>> | Closes: https://lore.kernel.org/oe-kbuild-all/202510221301.wU3TSqMg-lkp@intel.com/
>>
>> All errors (new ones prefixed by >>):
>>
>> drivers/gpu/drm/i915/gem/i915_gem_shmem.c: In function '__create_shmem':
>>>> drivers/gpu/drm/i915/gem/i915_gem_shmem.c:511:59: error: 'struct drm_device' has no member named 'huge_mnt'
>> 511 | filp = shmem_file_setup_with_mnt(i915->drm.huge_mnt, "i915",
>> | ^
>>
>>
>> vim +511 drivers/gpu/drm/i915/gem/i915_gem_shmem.c
>>
>> 486
>> 487 static int __create_shmem(struct drm_i915_private *i915,
>> 488 struct drm_gem_object *obj,
>> 489 resource_size_t size)
>> 490 {
>> 491 unsigned long flags = VM_NORESERVE;
>> 492 struct file *filp;
>> 493
>> 494 drm_gem_private_object_init(&i915->drm, obj, size);
>> 495
>> 496 /* XXX: The __shmem_file_setup() function returns -EINVAL if size is
>> 497 * greater than MAX_LFS_FILESIZE.
>> 498 * To handle the same error as other code that returns -E2BIG when
>> 499 * the size is too large, we add a code that returns -E2BIG when the
>> 500 * size is larger than the size that can be handled.
>> 501 * If BITS_PER_LONG is 32, size > MAX_LFS_FILESIZE is always false,
>> 502 * so we only needs to check when BITS_PER_LONG is 64.
>> 503 * If BITS_PER_LONG is 32, E2BIG checks are processed when
>> 504 * i915_gem_object_size_2big() is called before init_object() callback
>> 505 * is called.
>> 506 */
>> 507 if (BITS_PER_LONG == 64 && size > MAX_LFS_FILESIZE)
>> 508 return -E2BIG;
>> 509
>> 510 if (drm_gem_has_huge_mnt(&i915->drm))
>> > 511 filp = shmem_file_setup_with_mnt(i915->drm.huge_mnt, "i915",
>> 512 size, flags);
>
> Maybe instead of this drm_gem_has_huge_mnt() (or in addition to), we
> should have a drm_gem_get_huge_mnt() helper, so we don't have drivers
> dereferencing drm_device::huge_mnt directly and we can get rid of it on
> non THP configs.
Yes, drm_gem_get_huge_mnt() should be enough. This would prevent build
errors like that for builds with CONFIG_TRANSPARENT_PAGE=n without
having to insert ifdefs and would also just compile to a single
shmem_file_setup() here. The few places which actually need a boolean
value can simply do !!drm_gem_get_huge_mnt(dev).
>
>> 513 else
>> 514 filp = shmem_file_setup("i915", size, flags);
>> 515 if (IS_ERR(filp))
>> 516 return PTR_ERR(filp);
>> 517
>> 518 /*
>> 519 * Prevent -EFBIG by allowing large writes beyond MAX_NON_LFS on shmem
>> 520 * objects by setting O_LARGEFILE.
>> 521 */
>> 522 if (force_o_largefile())
>> 523 filp->f_flags |= O_LARGEFILE;
>> 524
>> 525 obj->filp = filp;
>> 526 return 0;
>> 527 }
>> 528
>>
>
Regards,
Loïc
next prev parent reply other threads:[~2025-10-22 8:28 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-21 11:30 [PATCH v5 00/12] drm: Reduce page tables overhead with THP Loïc Molinari
2025-10-21 11:30 ` [PATCH v5 01/12] drm/shmem-helper: Simplify page offset calculation in fault handler Loïc Molinari
2025-10-21 11:30 ` [PATCH v5 02/12] drm/shmem-helper: Implement map_pages fault-around handler Loïc Molinari
2025-10-21 11:30 ` [PATCH v5 03/12] drm/shmem-helper: Map huge pages in fault handlers Loïc Molinari
2025-10-21 11:30 ` [PATCH v5 04/12] drm/gem: Introduce drm_gem_get_unmapped_area() fop Loïc Molinari
2025-10-27 11:38 ` Hugh Dickins
2025-11-10 14:32 ` Loïc Molinari
2025-10-21 11:30 ` [PATCH v5 05/12] drm/gem: Add huge tmpfs mountpoint helpers Loïc Molinari
2025-10-21 11:43 ` Boris Brezillon
2025-10-21 11:30 ` [PATCH v5 06/12] drm/i915: Use " Loïc Molinari
2025-10-22 1:47 ` kernel test robot
2025-10-22 3:25 ` kernel test robot
2025-10-22 8:05 ` Boris Brezillon
2025-10-22 8:28 ` Loïc Molinari [this message]
2025-10-21 11:30 ` [PATCH v5 07/12] drm/v3d: " Loïc Molinari
2025-10-21 11:30 ` [PATCH v5 08/12] drm/gem: Get rid of *_with_mnt helpers Loïc Molinari
2025-10-21 11:30 ` [PATCH v5 09/12] drm/panthor: Introduce huge tmpfs mountpoint option Loïc Molinari
2025-10-21 11:30 ` [PATCH v5 10/12] drm/panthor: Improve IOMMU map/unmap debugging logs Loïc Molinari
2025-10-21 11:30 ` [PATCH v5 11/12] drm/panfrost: Introduce huge tmpfs mountpoint option Loïc Molinari
2025-10-21 11:30 ` [PATCH v5 12/12] Documentation/gpu/drm-mm: Add THP paragraph to GEM mapping section Loïc Molinari
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=64040015-2840-4210-8019-a39e605d87a0@collabora.com \
--to=loic.molinari@collabora.com \
--cc=airlied@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=andi.shyti@linux.intel.com \
--cc=bagasdotme@gmail.com \
--cc=baolin.wang@linux.alibaba.com \
--cc=bbrezillon@kernel.org \
--cc=boris.brezillon@collabora.com \
--cc=brauner@kernel.org \
--cc=corbet@lwn.net \
--cc=healych@amazon.com \
--cc=hughd@google.com \
--cc=jani.nikula@linux.intel.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=liviu.dudau@arm.com \
--cc=lkp@intel.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mcanal@igalia.com \
--cc=mripard@kernel.org \
--cc=mwen@igalia.com \
--cc=nitin.r.gote@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=robh@kernel.org \
--cc=rodrigo.vivi@intel.com \
--cc=simona@ffwll.ch \
--cc=steven.price@arm.com \
--cc=tursulin@ursulin.net \
--cc=tzimmermann@suse.de \
--cc=viro@zeniv.linux.org.uk \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®