aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/vmstat.c1
-rw-r--r--mm/workingset.c14
2 files changed, 13 insertions, 2 deletions
diff --git a/mm/vmstat.c b/mm/vmstat.c
index d918f6192d15..dab53430f63c 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -1143,6 +1143,7 @@ const char * const vmstat_text[] = {
1143 "nr_slab_unreclaimable", 1143 "nr_slab_unreclaimable",
1144 "nr_isolated_anon", 1144 "nr_isolated_anon",
1145 "nr_isolated_file", 1145 "nr_isolated_file",
1146 "workingset_nodes",
1146 "workingset_refault", 1147 "workingset_refault",
1147 "workingset_activate", 1148 "workingset_activate",
1148 "workingset_restore", 1149 "workingset_restore",
diff --git a/mm/workingset.c b/mm/workingset.c
index 5a72c9d5e195..7e6ef312cea5 100644
--- a/mm/workingset.c
+++ b/mm/workingset.c
@@ -377,12 +377,20 @@ void workingset_update_node(struct radix_tree_node *node)
377 * already where they should be. The list_empty() test is safe 377 * already where they should be. The list_empty() test is safe
378 * as node->private_list is protected by the i_pages lock. 378 * as node->private_list is protected by the i_pages lock.
379 */ 379 */
380 VM_WARN_ON_ONCE(!irqs_disabled()); /* For __inc_lruvec_page_state */
381
380 if (node->count && node->count == node->exceptional) { 382 if (node->count && node->count == node->exceptional) {
381 if (list_empty(&node->private_list)) 383 if (list_empty(&node->private_list)) {
382 list_lru_add(&shadow_nodes, &node->private_list); 384 list_lru_add(&shadow_nodes, &node->private_list);
385 __inc_lruvec_page_state(virt_to_page(node),
386 WORKINGSET_NODES);
387 }
383 } else { 388 } else {
384 if (!list_empty(&node->private_list)) 389 if (!list_empty(&node->private_list)) {
385 list_lru_del(&shadow_nodes, &node->private_list); 390 list_lru_del(&shadow_nodes, &node->private_list);
391 __dec_lruvec_page_state(virt_to_page(node),
392 WORKINGSET_NODES);
393 }
386 } 394 }
387} 395}
388 396
@@ -473,6 +481,8 @@ static enum lru_status shadow_lru_isolate(struct list_head *item,
473 } 481 }
474 482
475 list_lru_isolate(lru, item); 483 list_lru_isolate(lru, item);
484 __dec_lruvec_page_state(virt_to_page(node), WORKINGSET_NODES);
485
476 spin_unlock(lru_lock); 486 spin_unlock(lru_lock);
477 487
478 /* 488 /*