[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z9GmYe-bdOZ8LQV5@infradead.org>
Date: Wed, 12 Mar 2025 08:21:05 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Matthew Wilcox <willy@...radead.org>
Cc: Christoph Hellwig <hch@...radead.org>, Sooyong Suk <s.suk@...sung.com>,
viro@...iv.linux.org.uk, linux-kernel@...r.kernel.org,
akpm@...ux-foundation.org, linux-mm@...ck.org,
jaewon31.kim@...il.com, spssyr@...il.com
Subject: Re: [RFC PATCH] block, fs: use FOLL_LONGTERM as gup_flags for direct
IO
On Fri, Mar 07, 2025 at 08:23:08PM +0000, Matthew Wilcox wrote:
> Howver, the problem is real.
What is the problem?
> What I've been asking for and don't have the answer to yet is:
>
> - What latency is acceptable to reclaim the pages allocated from CMA
> pageblocks?
> - Can we afford a TLB shootdown? An rmap walk?
> - Is the problem with anonymous or pagecache memory?
>
> I have vaguely been wondering about creating a separate (fake) NUMA node
> for the CMA memory so that userspace can control "none of this memory is
> in the CMA blocks". But that's not a great solution either.
Maybe I'm misunderstanding things, but CMA basically provides a region
that allows for large contiguous allocations from it, but otherwise
is used as bog normal kernel memory. But anyone who wants to allocate
from it needs to move all that memory. Which to me implies that:
- latency can be expected to be horrible because a lot of individual
allocations need to possibly be moved, and all of them could
be temporarily pinned for I/O
- any driver using CMA better do this during early boot time, or
at least under the expectation that doing a CMA allocation
temporarily causes a huge performance degradation.
If a caller can't cope with that it better don't use CMA.
Powered by blists - more mailing lists