On Thu, Apr 11, 2024 at 09:09:49PM +0800, Kefeng Wang wrote: > In order to support batch mm counter updating in filemap_map_pages(), > make set_pte_range() return the type of MM_COUNTERS and move mm counter > updating out of set_pte_range(). I don't like this. You're making set_pte_range() harder to use. It's also rather overengineered; if you're calling set_pte_range() from filemap.c, you already know the folios are MM_FILEPAGES.