diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2017-10-03 10:14:26 -0400 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2017-10-03 10:14:26 -0400 |
commit | a40ff75d04266020ad17c013517795c824326f91 (patch) | |
tree | 79d27e81ce92c63ce673f186dfc3b03c592425ee | |
parent | 91139d52e3dc2da811737ea030c008889ba34ccb (diff) | |
download | 4.12-rt-patches-a40ff75d04266020ad17c013517795c824326f91.tar.gz |
refresh mm-memcontrol-do_not_disable_irq.patch
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r-- | patches/mm-memcontrol-do_not_disable_irq.patch | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/patches/mm-memcontrol-do_not_disable_irq.patch b/patches/mm-memcontrol-do_not_disable_irq.patch index cddbaeaf4ff64..7c69bcf0f840e 100644 --- a/patches/mm-memcontrol-do_not_disable_irq.patch +++ b/patches/mm-memcontrol-do_not_disable_irq.patch @@ -1,15 +1,15 @@ +From 1c3b17cef6eaa968d08ff40da49d555d06b27665 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Subject: mm/memcontrol: Replace local_irq_disable with local locks Date: Wed, 28 Jan 2015 17:14:16 +0100 +Subject: [PATCH] mm/memcontrol: Replace local_irq_disable with local locks There are a few local_irq_disable() which then take sleeping locks. This patch converts them local locks. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> ---- - mm/memcontrol.c | 20 ++++++++++++++------ - 1 file changed, 14 insertions(+), 6 deletions(-) +diff --git a/mm/memcontrol.c b/mm/memcontrol.c +index afb76cd62fd0..4fabbdd2e685 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -69,6 +69,7 @@ @@ -29,7 +29,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> /* Whether legacy memory+swap accounting is active */ static bool do_memsw_account(void) { -@@ -4535,12 +4538,12 @@ static int mem_cgroup_move_account(struc +@@ -4546,12 +4549,12 @@ static int mem_cgroup_move_account(struct page *page, ret = 0; @@ -44,7 +44,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> out_unlock: unlock_page(page); out: -@@ -5422,10 +5425,10 @@ void mem_cgroup_commit_charge(struct pag +@@ -5433,10 +5436,10 @@ void mem_cgroup_commit_charge(struct page *page, struct mem_cgroup *memcg, commit_charge(page, memcg, lrucare); @@ -57,16 +57,17 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (do_memsw_account() && PageSwapCache(page)) { swp_entry_t entry = { .val = page_private(page) }; -@@ -5481,14 +5484,14 @@ static void uncharge_batch(struct mem_cg +@@ -5492,7 +5495,7 @@ static void uncharge_batch(struct mem_cgroup *memcg, unsigned long pgpgout, memcg_oom_recover(memcg); } - local_irq_save(flags); + local_lock_irqsave(event_lock, flags); - __this_cpu_sub(memcg->stat->count[MEM_CGROUP_STAT_RSS], nr_anon); - __this_cpu_sub(memcg->stat->count[MEM_CGROUP_STAT_CACHE], nr_file); - __this_cpu_sub(memcg->stat->count[MEM_CGROUP_STAT_RSS_HUGE], nr_huge); - __this_cpu_add(memcg->stat->events[MEM_CGROUP_EVENTS_PGPGOUT], pgpgout); + __this_cpu_sub(memcg->stat->count[MEMCG_RSS], nr_anon); + __this_cpu_sub(memcg->stat->count[MEMCG_CACHE], nr_file); + __this_cpu_sub(memcg->stat->count[MEMCG_RSS_HUGE], nr_huge); +@@ -5500,7 +5503,7 @@ static void uncharge_batch(struct mem_cgroup *memcg, unsigned long pgpgout, + __this_cpu_add(memcg->stat->events[PGPGOUT], pgpgout); __this_cpu_add(memcg->stat->nr_page_events, nr_pages); memcg_check_events(memcg, dummy_page); - local_irq_restore(flags); @@ -74,7 +75,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (!mem_cgroup_is_root(memcg)) css_put_many(&memcg->css, nr_pages); -@@ -5838,6 +5841,7 @@ void mem_cgroup_swapout(struct page *pag +@@ -5854,6 +5857,7 @@ void mem_cgroup_swapout(struct page *page, swp_entry_t entry) { struct mem_cgroup *memcg, *swap_memcg; unsigned short oldid; @@ -82,7 +83,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> VM_BUG_ON_PAGE(PageLRU(page), page); VM_BUG_ON_PAGE(page_count(page), page); -@@ -5878,12 +5882,16 @@ void mem_cgroup_swapout(struct page *pag +@@ -5894,12 +5898,16 @@ void mem_cgroup_swapout(struct page *page, swp_entry_t entry) * important here to have the interrupts disabled because it is the * only synchronisation we have for udpating the per-CPU variables. */ @@ -99,3 +100,6 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> } /* +-- +2.1.4 + |