2020-09-04 20:10:21 +00:00
|
|
|
From 89359abb03085a37091da76ad6dc84edb3e5ec03 Mon Sep 17 00:00:00 2001
|
|
|
|
Message-Id: <89359abb03085a37091da76ad6dc84edb3e5ec03.1599166691.git.zanussi@kernel.org>
|
|
|
|
In-Reply-To: <56457dc415803c8abc5acb513ada877a79596f05.1599166690.git.zanussi@kernel.org>
|
|
|
|
References: <56457dc415803c8abc5acb513ada877a79596f05.1599166690.git.zanussi@kernel.org>
|
2020-03-28 12:59:50 +00:00
|
|
|
From: Matt Fleming <matt@codeblueprint.co.uk>
|
|
|
|
Date: Sun, 26 Jan 2020 21:19:45 +0000
|
2020-09-04 20:10:21 +00:00
|
|
|
Subject: [PATCH 318/333] mm/memcontrol: Move misplaced
|
2020-03-28 12:59:50 +00:00
|
|
|
local_unlock_irqrestore()
|
2020-09-04 20:10:21 +00:00
|
|
|
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.142-rt63.tar.xz
|
2020-03-28 12:59:50 +00:00
|
|
|
|
|
|
|
[ Upstream commit 071a1d6a6e14d0dec240a8c67b425140d7f92f6a ]
|
|
|
|
|
|
|
|
The comment about local_lock_irqsave() mentions just the counters and
|
|
|
|
css_put_many()'s callback just invokes a worker so it is safe to move the
|
|
|
|
unlock function after memcg_check_events() so css_put_many() can be invoked
|
|
|
|
without the lock acquired.
|
|
|
|
|
|
|
|
Cc: Daniel Wagner <wagi@monom.org>
|
|
|
|
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
|
|
|
|
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
|
|
|
|
[bigeasy: rewrote the patch description]
|
|
|
|
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|
|
|
---
|
|
|
|
mm/memcontrol.c | 2 +-
|
|
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
|
|
|
|
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
|
2020-08-28 04:53:35 +00:00
|
|
|
index a54cfafba8ad..7b506d178aa0 100644
|
2020-03-28 12:59:50 +00:00
|
|
|
--- a/mm/memcontrol.c
|
|
|
|
+++ b/mm/memcontrol.c
|
2020-04-21 20:13:52 +00:00
|
|
|
@@ -6538,10 +6538,10 @@ void mem_cgroup_swapout(struct page *page, swp_entry_t entry)
|
2020-03-28 12:59:50 +00:00
|
|
|
mem_cgroup_charge_statistics(memcg, page, PageTransHuge(page),
|
|
|
|
-nr_entries);
|
|
|
|
memcg_check_events(memcg, page);
|
|
|
|
+ local_unlock_irqrestore(event_lock, flags);
|
|
|
|
|
|
|
|
if (!mem_cgroup_is_root(memcg))
|
|
|
|
css_put_many(&memcg->css, nr_entries);
|
|
|
|
- local_unlock_irqrestore(event_lock, flags);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
--
|
2020-06-22 13:14:16 +00:00
|
|
|
2.17.1
|
2020-03-28 12:59:50 +00:00
|
|
|
|