On Fri, Nov 01, 2019 at 10:46:03AM +1100, Dave Chinner wrote: > From: Dave Chinner <dchinner@xxxxxxxxxx> > > The tracepoint information in the shrinker code don't make a lot of Nit: doesn't > sense anymore and contain redundant information as a result of the > changes in the patchset. Refine the information passed to the > tracepoints so they expose the operation of the shrinkers more > precisely and clean up the remaining code and varibles in the Nit: variables > shrinker code so it all makes sense. > > Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx> > --- > include/trace/events/vmscan.h | 69 ++++++++++++++++------------------- > mm/vmscan.c | 24 +++++------- > 2 files changed, 41 insertions(+), 52 deletions(-) > ... > diff --git a/mm/vmscan.c b/mm/vmscan.c > index c0e2bf656e3f..7a8256322150 100644 > --- a/mm/vmscan.c > +++ b/mm/vmscan.c ... > @@ -624,23 +622,21 @@ static unsigned long do_shrink_slab(struct shrink_control *shrinkctl, > cond_resched(); > } > done: ... > if (next_deferred > 0) > - new_nr = atomic64_add_return(next_deferred, > - &shrinker->nr_deferred[nid]); > - else > - new_nr = atomic64_read(&shrinker->nr_deferred[nid]); > + atomic64_add(next_deferred, &shrinker->nr_deferred[nid]); > > - trace_mm_shrink_slab_end(shrinker, nid, freed, deferred_count, new_nr, > - scan_count); > + trace_mm_shrink_slab_end(shrinker, nid, freed, scanned_objects, > + next_deferred); I guess this invalidates my comment on the previous patch around new_nr. Looks Ok to me: Reviewed-by: Brian Foster <bfoster@xxxxxxxxxx> > return freed; > } > > -- > 2.24.0.rc0 >