From: Andrew Morton <akpm@linux-foundation.org>
To: cgel.zte@gmail.com
Cc: hughd@google.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, Yang Yang <yang.yang29@zte.com.cn>,
Zeal Robot <zealci@zte.com.cn>,
Matthew Wilcox <willy@infradead.org>
Subject: Re: [PATCH] mm/shmem: fix build failure when CONFIG_TRANSPARENT_HUGEPAGE is not set
Date: Sat, 7 May 2022 11:55:11 -0700 [thread overview]
Message-ID: <20220507115511.bfe87f9126aefad64894807e@linux-foundation.org> (raw)
In-Reply-To: <20220505113354.202979-1-xu.xin16@zte.com.cn>
On Thu, 5 May 2022 11:33:55 +0000 cgel.zte@gmail.com wrote:
> From: Yang Yang <yang.yang29@zte.com.cn>
>
> shmem_add_to_page_cache() use THP_FILE_FALLBACK even if
> CONFIG_TRANSPARENT_HUGEPAGE is not set and triggers this
> compile error.
>
> Add ifdef CONFIG_TRANSPARENT_HUGEPAGE in shmem_add_to_page_cache().
Thanks.
> --- a/mm/shmem.c
> +++ b/mm/shmem.c
> @@ -717,10 +717,12 @@ static int shmem_add_to_page_cache(struct folio *folio,
> if (!folio_test_swapcache(folio)) {
> error = mem_cgroup_charge(folio, charge_mm, gfp);
> if (error) {
> +#ifdef CONFIG_TRANSPARENT_HUGEPAGE
> if (folio_test_large(folio)) {
> count_vm_event(THP_FILE_FALLBACK);
> count_vm_event(THP_FILE_FALLBACK_CHARGE);
> }
> +#endif
> goto error;
> }
> }
I believe Matthew address this in version 2 of "Folio patches for
5.19".
I'm aiming to get that (and much more!) pushed out or Monday's linux-next.
prev parent reply other threads:[~2022-05-07 18:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-05 11:33 cgel.zte
2022-05-07 18:55 ` Andrew Morton [this message]
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=20220507115511.bfe87f9126aefad64894807e@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=cgel.zte@gmail.com \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=willy@infradead.org \
--cc=yang.yang29@zte.com.cn \
--cc=zealci@zte.com.cn \
/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