From: Chao Yu <chao@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: chao@kernel.org, jaegeuk@kernel.org,
linux-f2fs-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH 1/2] f2fs: use vmalloc instead of kvmalloc in .init_{,de}compress_ctx
Date: Tue, 13 May 2025 14:34:25 +0800 [thread overview]
Message-ID: <ba2bc9bf-7cec-4871-b603-8130c84fc917@kernel.org> (raw)
In-Reply-To: <aCLgPLUiFsiCzSBK@infradead.org>
On 5/13/25 14:01, Christoph Hellwig wrote:
> On Tue, May 13, 2025 at 01:57:20PM +0800, Chao Yu wrote:
>> .init_{,de}compress_ctx uses kvmalloc() to alloc memory, it will try
>> to allocate physically continuous page first, it may cause more memory
>> allocation pressure, let's use vmalloc instead to mitigate it.
>
> Shouldn't this be handled in kvmalloc instead of working around it in
> callers?
kvmalloc() will allocate physically continuous page first, so it may race
w/ other physically continuous page allocator who uses kmalloc(), in
scenario of there are few physically continuous pages.
Thanks,
prev parent reply other threads:[~2025-05-13 6:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20250513055721.2918793-1-chao@kernel.org>
2025-05-13 6:01 ` [PATCH 1/2] f2fs: use vmalloc instead of kvmalloc in .init_{,de}compress_ctx Christoph Hellwig
2025-05-13 6:34 ` Chao Yu [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=ba2bc9bf-7cec-4871-b603-8130c84fc917@kernel.org \
--to=chao@kernel.org \
--cc=hch@infradead.org \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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