[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <594dbec7-b560-44e5-a684-93dcb8ba85df@redhat.com>
Date: Wed, 10 Apr 2024 14:34:35 +0200
From: David Hildenbrand <david@...hat.com>
To: Sumanth Korikkar <sumanthk@...ux.ibm.com>, akpm@...ux-foundation.org,
linux-mm@...ck.org
Cc: hughd@...gle.com, hca@...ux.ibm.com, gor@...ux.ibm.com,
agordeev@...ux.ibm.com, iii@...ux.ibm.com, linux-s390@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/shmem: Inline shmem_is_huge() for disabled transparent
hugepages
On 09.04.24 17:54, Sumanth Korikkar wrote:
> In order to minimize code size (CONFIG_CC_OPTIMIZE_FOR_SIZE=y),
> compiler might choose to make a regular function call (out-of-line) for
> shmem_is_huge() instead of inlining it. When transparent hugepages are
> disabled (CONFIG_TRANSPARENT_HUGEPAGE=n), it can cause compilation
> error.
>
> mm/shmem.c: In function ‘shmem_getattr’:
> ./include/linux/huge_mm.h:383:27: note: in expansion of macro ‘BUILD_BUG’
> 383 | #define HPAGE_PMD_SIZE ({ BUILD_BUG(); 0; })
> | ^~~~~~~~~
> mm/shmem.c:1148:33: note: in expansion of macro ‘HPAGE_PMD_SIZE’
> 1148 | stat->blksize = HPAGE_PMD_SIZE;
>
> To prevent the possible error, always inline shmem_is_huge() when
> transparent hugepages are disabled.
>
Do you know which commit introduced that?
--
Cheers,
David / dhildenb
Powered by blists - more mailing lists