Re: [RFC PATCH] block, fs: use FOLL_LONGTERM as gup_flags for direct IO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux