On Fri, Mar 08, 2024 at 12:16:09AM -0500, Kent Overstreet wrote: > On Fri, Mar 08, 2024 at 04:48:11AM +0000, Matthew Wilcox wrote: > > On Thu, Mar 07, 2024 at 10:13:22PM -0500, Kent Overstreet wrote: > > > This steals it to make __ksize() faster; it's now a single dependent > > > load, instead of two. This is going to be important for tracking the > > > amount of memory stranded by RCU, which we want to be able to do if > > > we're going to be freeing all pagecache folios (and perhaps all folios) > > > via RCU. > > > > Do you have any measurements? I don't necessarily object, it's just > > that I would have thought we were already bringing slab->slab_cache > > into cache as part of the freeing operation. > > for kfree() yes, but for kfree_rcu() no - that'll happen significantly > later. > > I don't have measurements that it /matters/, but since we have the u32 > there now this seems like a good use for it. There are potentiually better uses for those bits. We could turn folio_test_slab() into a PageType test, freeing up a page flag.