On Tue, Aug 19, 2025 at 08:53:59AM -0700, Shakeel Butt wrote: > My initial thinking was based on Qu's original proposal which was using > root memcg where there will not be any difference between accounted > file pages and system wide file pages. However with Boris's change, we > can actually get the estimate, as you pointed out, by subtracting the > number of accounted file pages from system wide number of file pages. > > However I still think we should keep this new metric because of > performance reason. To get accounted file pages, we need to read > memory.stat of the root memcg which can be very expensive. Basically it > may have to flush the rstat update trees on all the CPUs on the system. > Since this new metric will be used to calculate system overhead, the > high cost will limit how frequently a user can query the latest stat. OK, but couldn't we make that argument for anything else? Like slab, say. Why's "file" memory different?