Re: [LSF/MM/BPF TOPIC] Direct Reclaim and Filesystems

Christoph Hellwig
2026-04-10T07:08:16Z

On Thu, Apr 09, 2026 at 02:09:06PM -0700, Boris Burkov wrote:
> - Reclaim freeing metadata and/or forcing metadata writeback [1][3][4]
> In btrfs, this results in redundant work fetching and writing btree nodes if
> it happens to hot nodes in the btree. Should we be trying to lock some of
> these nodes down from reclaim? If so, how many is appropriate/safe?

The solution to that is object based reclaim as in the xfs buffer
cache. That way you can set priorities on the nodes to keep them on
the LRU, or even pin things down much more easily.

When we last discussed this Josef didn't think it would work for btrfs
due to the amount of metadata, but I don't think that is a valid
argument.