From: Matthew Wilcox <willy@infradead.org>
To: Zhang Qilong <zhangqilong3@huawei.com>
Cc: arnd@arndb.de, gregkh@linuxfoundation.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
lorenzo.stoakes@oracle.com, david@redhat.com,
wangkefeng.wang@huawei.com, sunnanyong@huawei.com
Subject: Re: [PATCH resend v2] /dev/zero: try to align PMD_SIZE for private mapping
Date: Wed, 30 Jul 2025 13:49:34 +0100 [thread overview]
Message-ID: <aIoU3hO9JBAyuTcy@casper.infradead.org> (raw)
In-Reply-To: <20250730091905.383353-1-zhangqilong3@huawei.com>
On Wed, Jul 30, 2025 at 05:19:05PM +0800, Zhang Qilong wrote:
> + if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE))
> + return thp_get_unmapped_area(file, addr, len, pgoff, flags);
> +
> return mm_get_unmapped_area(current->mm, file, addr, len, pgoff, flags);
I'm sure the build bots will give us a compiler error.
If CONFIG_TRANSPARENT_HUGEPAGE is not enabled, we get:
include/linux/huge_mm.h:#define thp_get_unmapped_area NULL
and we chose that so that various filesystems can unconditionally set
their .get_unmapped_area method to it.
Which means the cpp will turn this into:
if (0)
return NULL(file, addr, len, pgoff, flags);
and the compiler will say:
error: implicit declaration of function ‘NULL’ [-Wimplicit-function-declaration]
next prev parent reply other threads:[~2025-07-30 12:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-30 9:19 Zhang Qilong
2025-07-30 9:33 ` David Hildenbrand
2025-07-30 12:49 ` Matthew Wilcox [this message]
2025-07-30 12:59 ` Lorenzo Stoakes
2025-07-30 13:04 ` Lorenzo Stoakes
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=aIoU3hO9JBAyuTcy@casper.infradead.org \
--to=willy@infradead.org \
--cc=arnd@arndb.de \
--cc=david@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=sunnanyong@huawei.com \
--cc=wangkefeng.wang@huawei.com \
--cc=zhangqilong3@huawei.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