Skip to content

Commit 3db6581

Browse files
hnaztorvalds
authored andcommitted
Revert "mm, vmscan: account for skipped pages as a partial scan"
This reverts commit d7f0552. Now that reclaimability of a node is no longer based on the ratio between pages scanned and theoretically reclaimable pages, we can remove accounting tricks for pages skipped due to zone constraints. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Johannes Weiner <[email protected]> Acked-by: Hillf Danton <[email protected]> Acked-by: Michal Hocko <[email protected]> Cc: Jia He <[email protected]> Cc: Mel Gorman <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent c822f62 commit 3db6581

File tree

1 file changed

+4
-18
lines changed

1 file changed

+4
-18
lines changed

mm/vmscan.c

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1472,12 +1472,12 @@ static unsigned long isolate_lru_pages(unsigned long nr_to_scan,
14721472
unsigned long nr_taken = 0;
14731473
unsigned long nr_zone_taken[MAX_NR_ZONES] = { 0 };
14741474
unsigned long nr_skipped[MAX_NR_ZONES] = { 0, };
1475-
unsigned long skipped = 0, total_skipped = 0;
1475+
unsigned long skipped = 0;
14761476
unsigned long scan, nr_pages;
14771477
LIST_HEAD(pages_skipped);
14781478

14791479
for (scan = 0; scan < nr_to_scan && nr_taken < nr_to_scan &&
1480-
!list_empty(src);) {
1480+
!list_empty(src); scan++) {
14811481
struct page *page;
14821482

14831483
page = lru_to_page(src);
@@ -1491,12 +1491,6 @@ static unsigned long isolate_lru_pages(unsigned long nr_to_scan,
14911491
continue;
14921492
}
14931493

1494-
/*
1495-
* Account for scanned and skipped separetly to avoid the pgdat
1496-
* being prematurely marked unreclaimable by pgdat_reclaimable.
1497-
*/
1498-
scan++;
1499-
15001494
switch (__isolate_lru_page(page, mode)) {
15011495
case 0:
15021496
nr_pages = hpage_nr_pages(page);
@@ -1525,24 +1519,16 @@ static unsigned long isolate_lru_pages(unsigned long nr_to_scan,
15251519
if (!list_empty(&pages_skipped)) {
15261520
int zid;
15271521

1522+
list_splice(&pages_skipped, src);
15281523
for (zid = 0; zid < MAX_NR_ZONES; zid++) {
15291524
if (!nr_skipped[zid])
15301525
continue;
15311526

15321527
__count_zid_vm_events(PGSCAN_SKIP, zid, nr_skipped[zid]);
15331528
skipped += nr_skipped[zid];
15341529
}
1535-
1536-
/*
1537-
* Account skipped pages as a partial scan as the pgdat may be
1538-
* close to unreclaimable. If the LRU list is empty, account
1539-
* skipped pages as a full scan.
1540-
*/
1541-
total_skipped = list_empty(src) ? skipped : skipped >> 2;
1542-
1543-
list_splice(&pages_skipped, src);
15441530
}
1545-
*nr_scanned = scan + total_skipped;
1531+
*nr_scanned = scan;
15461532
trace_mm_vmscan_lru_isolate(sc->reclaim_idx, sc->order, nr_to_scan,
15471533
scan, skipped, nr_taken, mode, lru);
15481534
update_lru_sizes(lruvec, lru, nr_zone_taken);

0 commit comments

Comments
 (0)