On Mon, Mar 06, 2023 at 02:41:12PM -0800, Vipin Sharma wrote: > Create a global counter for total number of pages available > in MMU page caches across all VMs. Add mmu_shadow_page_cache > pages to this counter. I think I prefer counting the objects on-demand in mmu_shrink_count(), instead of keeping track of the count. Keeping track of the count adds complexity to the topup/alloc paths for the sole benefit of the shrinker. I'd rather contain that complexity to the shrinker code unless there is a compelling reason to optimize mmu_shrink_count(). IIRC we discussed this at one point. Was there a reason to take this approach that I'm just forgetting?