On Thu, Aug 01, 2019 at 01:16:03AM -0700, Christoph Hellwig wrote: > > + > > + /* > > + * Account for the buffer memory freed here so memory reclaim > > + * sees this and not just the xfs_buf slab entry being freed. > > + */ > > + if (current->reclaim_state) > > + current->reclaim_state->reclaimed_pages += bp->b_page_count; > > + > > I think this wants a mm-layer helper ala: > > static inline void shrinker_mark_pages_reclaimed(unsigned long nr_pages) > { > if (current->reclaim_state) > current->reclaim_state->reclaimed_pages += nr_pages; > } > > plus good documentation on when to use it. Sure, but that's something for patch 6, not this one :) Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx