diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2016-12-26 13:38:27 -0500 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2016-12-26 13:38:27 -0500 |
commit | b52d07c64afc7d7a1919cbd8c64be59f60a39a73 (patch) | |
tree | 8beeb836b3c624e46afd587bc2600a8dced8a0c5 | |
parent | 5441de10b10d1b9c270970f7c279ca1857de5063 (diff) | |
download | 4.9-rt-patches-b52d07c64afc7d7a1919cbd8c64be59f60a39a73.tar.gz |
mm: replace interim workingset with import for ctxt refreshrt-v4.9-rc8
-rw-r--r-- | patches/mm-workingset-do-not-protect-workingset_shadow_nodes.patch | 41 |
1 files changed, 14 insertions, 27 deletions
diff --git a/patches/mm-workingset-do-not-protect-workingset_shadow_nodes.patch b/patches/mm-workingset-do-not-protect-workingset_shadow_nodes.patch index f9572f03c2e2d..3b838eb03fb81 100644 --- a/patches/mm-workingset-do-not-protect-workingset_shadow_nodes.patch +++ b/patches/mm-workingset-do-not-protect-workingset_shadow_nodes.patch @@ -1,8 +1,6 @@ -From 9a158b5f0a7eff095045bfad05844306bf6a7fb1 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 29 Jan 2015 17:19:44 +0100 -Subject: [PATCH] mm/workingset: Do not protect workingset_shadow_nodes with - irq off +Subject: mm/workingset: Do not protect workingset_shadow_nodes with irq off workingset_shadow_nodes is protected by local_irq_disable(). Some users use spin_lock_irq(). @@ -11,14 +9,12 @@ so I catch users of it which will be introduced later. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - include/linux/swap.h | 4 +++- - mm/filemap.c | 13 +++++++++---- - mm/truncate.c | 7 +++++-- - mm/workingset.c | 23 ++++++++++++----------- + include/linux/swap.h | 4 +++- + mm/filemap.c | 13 +++++++++---- + mm/truncate.c | 7 +++++-- + mm/workingset.c | 23 ++++++++++++----------- 4 files changed, 29 insertions(+), 18 deletions(-) -diff --git a/include/linux/swap.h b/include/linux/swap.h -index e1d761463243..7fb321333353 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h @@ -11,6 +11,7 @@ @@ -29,7 +25,7 @@ index e1d761463243..7fb321333353 100644 #include <asm/page.h> struct notifier_block; -@@ -243,7 +244,8 @@ struct swap_info_struct { +@@ -246,7 +247,8 @@ struct swap_info_struct { void *workingset_eviction(struct address_space *mapping, struct page *page); bool workingset_refault(void *shadow); void workingset_activation(struct page *page); @@ -39,11 +35,9 @@ index e1d761463243..7fb321333353 100644 static inline unsigned int workingset_node_pages(struct radix_tree_node *node) { -diff --git a/mm/filemap.c b/mm/filemap.c -index 4bad32dd4b3b..c30aefb7f1d7 100644 --- a/mm/filemap.c +++ b/mm/filemap.c -@@ -159,9 +159,12 @@ static int page_cache_tree_insert(struct address_space *mapping, +@@ -159,9 +159,12 @@ static int page_cache_tree_insert(struct * node->private_list is protected by * mapping->tree_lock. */ @@ -58,7 +52,7 @@ index 4bad32dd4b3b..c30aefb7f1d7 100644 } return 0; } -@@ -217,8 +220,10 @@ static void page_cache_tree_delete(struct address_space *mapping, +@@ -217,8 +220,10 @@ static void page_cache_tree_delete(struc if (!dax_mapping(mapping) && !workingset_node_pages(node) && list_empty(&node->private_list)) { node->private_data = mapping; @@ -71,11 +65,9 @@ index 4bad32dd4b3b..c30aefb7f1d7 100644 } } -diff --git a/mm/truncate.c b/mm/truncate.c -index a01cce450a26..4bda37604f99 100644 --- a/mm/truncate.c +++ b/mm/truncate.c -@@ -62,9 +62,12 @@ static void clear_exceptional_entry(struct address_space *mapping, +@@ -62,9 +62,12 @@ static void clear_exceptional_entry(stru * protected by mapping->tree_lock. */ if (!workingset_node_shadows(node) && @@ -90,11 +82,9 @@ index a01cce450a26..4bda37604f99 100644 __radix_tree_delete_node(&mapping->page_tree, node); unlock: spin_unlock_irq(&mapping->tree_lock); -diff --git a/mm/workingset.c b/mm/workingset.c -index 617475f529f4..48674bf36fb1 100644 --- a/mm/workingset.c +++ b/mm/workingset.c -@@ -334,7 +334,8 @@ out: +@@ -334,7 +334,8 @@ void workingset_activation(struct page * * point where they would still be useful. */ @@ -104,7 +94,7 @@ index 617475f529f4..48674bf36fb1 100644 static unsigned long count_shadow_nodes(struct shrinker *shrinker, struct shrink_control *sc) -@@ -344,9 +345,9 @@ static unsigned long count_shadow_nodes(struct shrinker *shrinker, +@@ -344,9 +345,9 @@ static unsigned long count_shadow_nodes( unsigned long pages; /* list_lru lock nests inside IRQ-safe mapping->tree_lock */ @@ -115,9 +105,9 @@ index 617475f529f4..48674bf36fb1 100644 + shadow_nodes = list_lru_shrink_count(&__workingset_shadow_nodes, sc); + local_unlock_irq(workingset_shadow_lock); - if (memcg_kmem_enabled()) { + if (sc->memcg) { pages = mem_cgroup_node_nr_lru_pages(sc->memcg, sc->nid, -@@ -438,9 +439,9 @@ static enum lru_status shadow_lru_isolate(struct list_head *item, +@@ -438,9 +439,9 @@ static enum lru_status shadow_lru_isolat spin_unlock(&mapping->tree_lock); ret = LRU_REMOVED_RETRY; out: @@ -129,7 +119,7 @@ index 617475f529f4..48674bf36fb1 100644 spin_lock(lru_lock); return ret; } -@@ -451,10 +452,10 @@ static unsigned long scan_shadow_nodes(struct shrinker *shrinker, +@@ -451,10 +452,10 @@ static unsigned long scan_shadow_nodes(s unsigned long ret; /* list_lru lock nests inside IRQ-safe mapping->tree_lock */ @@ -161,6 +151,3 @@ index 617475f529f4..48674bf36fb1 100644 err: return ret; } --- -2.10.1 - |