* Re: [PATCH 1/2] f2fs: use vmalloc instead of kvmalloc in .init_{,de}compress_ctx
[not found] <20250513055721.2918793-1-chao@kernel.org>
@ 2025-05-13 6:01 ` Christoph Hellwig
2025-05-13 6:34 ` Chao Yu
0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2025-05-13 6:01 UTC (permalink / raw)
To: Chao Yu; +Cc: jaegeuk, linux-f2fs-devel, linux-kernel, linux-mm
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?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 1/2] f2fs: use vmalloc instead of kvmalloc in .init_{,de}compress_ctx
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
0 siblings, 0 replies; 2+ messages in thread
From: Chao Yu @ 2025-05-13 6:34 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: chao, jaegeuk, linux-f2fs-devel, linux-kernel, linux-mm
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,
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-05-13 6:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox