aboutsummaryrefslogtreecommitdiffstats
path: root/mm/vmscan.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r--mm/vmscan.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index d036e59d302b..255226554a3d 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -250,6 +250,7 @@ unsigned long shrink_slab(struct shrink_control *shrink,
250 unsigned long long delta; 250 unsigned long long delta;
251 unsigned long total_scan; 251 unsigned long total_scan;
252 unsigned long max_pass; 252 unsigned long max_pass;
253 int shrink_ret = 0;
253 254
254 max_pass = do_shrinker_shrink(shrinker, shrink, 0); 255 max_pass = do_shrinker_shrink(shrinker, shrink, 0);
255 delta = (4 * nr_pages_scanned) / shrinker->seeks; 256 delta = (4 * nr_pages_scanned) / shrinker->seeks;
@@ -274,9 +275,12 @@ unsigned long shrink_slab(struct shrink_control *shrink,
274 total_scan = shrinker->nr; 275 total_scan = shrinker->nr;
275 shrinker->nr = 0; 276 shrinker->nr = 0;
276 277
278 trace_mm_shrink_slab_start(shrinker, shrink, total_scan,
279 nr_pages_scanned, lru_pages,
280 max_pass, delta, total_scan);
281
277 while (total_scan >= SHRINK_BATCH) { 282 while (total_scan >= SHRINK_BATCH) {
278 long this_scan = SHRINK_BATCH; 283 long this_scan = SHRINK_BATCH;
279 int shrink_ret;
280 int nr_before; 284 int nr_before;
281 285
282 nr_before = do_shrinker_shrink(shrinker, shrink, 0); 286 nr_before = do_shrinker_shrink(shrinker, shrink, 0);
@@ -293,6 +297,8 @@ unsigned long shrink_slab(struct shrink_control *shrink,
293 } 297 }
294 298
295 shrinker->nr += total_scan; 299 shrinker->nr += total_scan;
300 trace_mm_shrink_slab_end(shrinker, shrink_ret, total_scan,
301 shrinker->nr);
296 } 302 }
297 up_read(&shrinker_rwsem); 303 up_read(&shrinker_rwsem);
298out: 304out: