On Thu, Jan 30, 2025 at 11:09 PM Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote: > > On Thu, Jan 30, 2025 at 04:18:05PM -0800, Vishal Moola (Oracle) wrote: > > + rcu_read_lock(); > > + xas_for_each(&xas, folio, last) { > > This only maps folios currently in the page cache, which makes it > usefull for everything except ramfs-style purely in-memory file systems. > I.e. for the shmem use case in the second patch it fails to swap in > swapped out tmpfs folios. Ah, I see. I can drop that patch then. Its primary purpose was to provide a user for vmap_file(). As you've pointed out, that won't work with tmpfs or anon pages. I'll hold off on a v2 until there are better usecases for vmap_file(). > > +EXPORT_SYMBOL(vmap_file); > > EXPORT_SYMBOL_GPL for any advances vmalloc-layer functionality, please. Ok, I'll keep that in mind in the future.