linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Sumanth Korikkar <sumanthk@linux.ibm.com>,
	akpm@linux-foundation.org, linux-mm@kvack.org
Cc: hughd@google.com, hca@linux.ibm.com, gor@linux.ibm.com,
	agordeev@linux.ibm.com, iii@linux.ibm.com,
	linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/shmem: Inline shmem_is_huge() for disabled transparent hugepages
Date: Wed, 10 Apr 2024 14:34:35 +0200	[thread overview]
Message-ID: <594dbec7-b560-44e5-a684-93dcb8ba85df@redhat.com> (raw)
In-Reply-To: <20240409155407.2322714-1-sumanthk@linux.ibm.com>

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



  reply	other threads:[~2024-04-10 12:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-09 15:54 Sumanth Korikkar
2024-04-10 12:34 ` David Hildenbrand [this message]
2024-04-10 15:26   ` Sumanth Korikkar
2024-04-10 15:51     ` David Hildenbrand
2024-04-10 16:07       ` Sumanth Korikkar
     [not found]         ` <1ce2fe6c-b56a-4582-a5d8-babc8fccef52@redhat.com>
2024-04-10 16:33           ` Peter Xu
     [not found]             ` <61a3bd6b-a352-4e02-8357-81ac7b9f2848@redhat.com>
     [not found]               ` <ZhbDoxxFAe0QQYz_@x1n>
2024-04-10 17:03                 ` David Hildenbrand

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=594dbec7-b560-44e5-a684-93dcb8ba85df@redhat.com \
    --to=david@redhat.com \
    --cc=agordeev@linux.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=hughd@google.com \
    --cc=iii@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=sumanthk@linux.ibm.com \
    /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