vmscan : simplify code
Subsystems (3)
PATCH 1/1 vmscan : simplify code
simplify the code for shrink_inactive_list.
Signed-off-by Huang Shijie <[email protected]>
--- mm/vmscan.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)
mm/vmscan.c +2 -4
@@ -1166,10 +1166,8 @@ static unsigned long shrink_inactive_list(unsigned long max_scan,__mod_zone_page_state (zone,NR_ISOLATED_ANON , nr_anon);__mod_zone_page_state (zone,NR_ISOLATED_FILE , nr_file); - reclaim_stat->recent_scanned[0 ] += count[LRU_INACTIVE_ANON ]; - reclaim_stat->recent_scanned[0 ] += count[LRU_ACTIVE_ANON ]; - reclaim_stat->recent_scanned[1 ] += count[LRU_INACTIVE_FILE ]; - reclaim_stat->recent_scanned[1 ] += count[LRU_ACTIVE_FILE ]; + reclaim_stat->recent_scanned[0 ] += nr_anon; + reclaim_stat->recent_scanned[1 ] += nr_file;spin_unlock_irq (&zone->lru_lock);
Signature · 7 lines
1.6.0.6 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 13 lines
simplify the code for
shrink_inactive_list.Signed-off-by Huang Shijie <[email protected]>--- mm/vmscan.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-)mm/vmscan.c +0
-0@@ -1166,10 +1166,8 @@ static unsigned long shrink_inactive_list(unsigned long max_scan,__mod_zone_page_state (zone,NR_ISOLATED_ANON , nr_anon);
mm/vmscan.c static unsigned long shrink_inactive_list(unsigned long max_scan, · line 1172
Quoted 10 lines
mm/vmscan.c +2
-4__mod_zone_page_state (zone,NR_ISOLATED_FILE , nr_file); - reclaim_stat->recent_scanned[0 ] += count[LRU_INACTIVE_ANON ]; - reclaim_stat->recent_scanned[0 ] += count[LRU_ACTIVE_ANON ]; - reclaim_stat->recent_scanned[1 ] += count[LRU_INACTIVE_FILE ]; - reclaim_stat->recent_scanned[1 ] += count[LRU_ACTIVE_FILE ]; + reclaim_stat->recent_scanned[0 ] += nr_anon; + reclaim_stat->recent_scanned[1 ] += nr_file;spin_unlock_irq (&zone->lru_lock);
Thank you.
Reviewed-by KOSAKI Motohiro <[email protected]>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 3 lines · Huang Shijie
simplify the code for
shrink_inactive_list.Signed-off-by Huang Shijie <[email protected]>
Reviewed-by Wu Fengguang <[email protected]>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>