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 Thu, Mar 06, 2025 at 07:26:52AM -0800, Christoph Hellwig wrote:
> On Thu, Mar 06, 2025 at 04:40:56PM +0900, Sooyong Suk wrote:
> > There are GUP references to pages that are serving as direct IO buffers.
> > Those pages can be allocated from CMA pageblocks despite they can be
> > pinned until the DIO is completed.
> 
> direct I/O is eactly the case that is not FOLL_LONGTERM and one of
> the reasons to even have the flag.  So big fat no to this.
> 
> You also completely failed to address the relevant mailinglist and
> maintainers.

You're right; this patch is so bad that it's insulting.

Howver, the problem is real.  And the alternative "solution" being
proposed is worse -- reintroducing cleancache and frontswap.

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.




[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