@@ -1472,12 +1472,12 @@ static unsigned long isolate_lru_pages(unsigned long nr_to_scan,
1472
1472
unsigned long nr_taken = 0 ;
1473
1473
unsigned long nr_zone_taken [MAX_NR_ZONES ] = { 0 };
1474
1474
unsigned long nr_skipped [MAX_NR_ZONES ] = { 0 , };
1475
- unsigned long skipped = 0 , total_skipped = 0 ;
1475
+ unsigned long skipped = 0 ;
1476
1476
unsigned long scan , nr_pages ;
1477
1477
LIST_HEAD (pages_skipped );
1478
1478
1479
1479
for (scan = 0 ; scan < nr_to_scan && nr_taken < nr_to_scan &&
1480
- !list_empty (src );) {
1480
+ !list_empty (src ); scan ++ ) {
1481
1481
struct page * page ;
1482
1482
1483
1483
page = lru_to_page (src );
@@ -1491,12 +1491,6 @@ static unsigned long isolate_lru_pages(unsigned long nr_to_scan,
1491
1491
continue ;
1492
1492
}
1493
1493
1494
- /*
1495
- * Account for scanned and skipped separetly to avoid the pgdat
1496
- * being prematurely marked unreclaimable by pgdat_reclaimable.
1497
- */
1498
- scan ++ ;
1499
-
1500
1494
switch (__isolate_lru_page (page , mode )) {
1501
1495
case 0 :
1502
1496
nr_pages = hpage_nr_pages (page );
@@ -1525,24 +1519,16 @@ static unsigned long isolate_lru_pages(unsigned long nr_to_scan,
1525
1519
if (!list_empty (& pages_skipped )) {
1526
1520
int zid ;
1527
1521
1522
+ list_splice (& pages_skipped , src );
1528
1523
for (zid = 0 ; zid < MAX_NR_ZONES ; zid ++ ) {
1529
1524
if (!nr_skipped [zid ])
1530
1525
continue ;
1531
1526
1532
1527
__count_zid_vm_events (PGSCAN_SKIP , zid , nr_skipped [zid ]);
1533
1528
skipped += nr_skipped [zid ];
1534
1529
}
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 );
1544
1530
}
1545
- * nr_scanned = scan + total_skipped ;
1531
+ * nr_scanned = scan ;
1546
1532
trace_mm_vmscan_lru_isolate (sc -> reclaim_idx , sc -> order , nr_to_scan ,
1547
1533
scan , skipped , nr_taken , mode , lru );
1548
1534
update_lru_sizes (lruvec , lru , nr_zone_taken );
0 commit comments