diff options
author | Johannes Weiner <hannes@cmpxchg.org> | 2015-06-10 14:14:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-06-10 19:43:43 -0400 |
commit | f371763a79d5212c2cb216b46fa8af46ba56cee3 (patch) | |
tree | 05901da392e1cd5b2c837e6709c7d262a5012ae9 | |
parent | 5129e87cb81996d4d7e8f5a86b5355c5f2d0383b (diff) |
mm: memcontrol: fix false-positive VM_BUG_ON() on -rt
On -rt, the VM_BUG_ON(!irqs_disabled()) triggers inside the memcg
swapout path because the spin_lock_irq(&mapping->tree_lock) in the
caller doesn't actually disable the hardware interrupts - which is fine,
because on -rt the tophalves run in process context and so we are still
safe from preemption while updating the statistics.
Remove the VM_BUG_ON() but keep the comment of what we rely on.
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Reported-by: Clark Williams <williams@redhat.com>
Cc: Fernando Lopez-Lezcano <nando@ccrma.Stanford.EDU>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | mm/memcontrol.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 9da23a7ec4c0..a04225d372ba 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -5835,9 +5835,7 @@ void mem_cgroup_swapout(struct page *page, swp_entry_t entry) | |||
5835 | if (!mem_cgroup_is_root(memcg)) | 5835 | if (!mem_cgroup_is_root(memcg)) |
5836 | page_counter_uncharge(&memcg->memory, 1); | 5836 | page_counter_uncharge(&memcg->memory, 1); |
5837 | 5837 | ||
5838 | /* XXX: caller holds IRQ-safe mapping->tree_lock */ | 5838 | /* Caller disabled preemption with mapping->tree_lock */ |
5839 | VM_BUG_ON(!irqs_disabled()); | ||
5840 | |||
5841 | mem_cgroup_charge_statistics(memcg, page, -1); | 5839 | mem_cgroup_charge_statistics(memcg, page, -1); |
5842 | memcg_check_events(memcg, page); | 5840 | memcg_check_events(memcg, page); |
5843 | } | 5841 | } |