[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <157435488706.21853.9491431504510528730.tip-bot2@tip-bot2>
Date: Thu, 21 Nov 2019 16:48:07 -0000
From: "tip-bot2 for Alexander Shishkin" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Song Liu <songliubraving@...com>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Jiri Olsa <jolsa@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Wanpeng Li <wanpengli@...cent.com>,
Yauheni Kaliuta <yauheni.kaliuta@...hat.com>,
Ingo Molnar <mingo@...nel.org>, x86 <x86@...nel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: [tip: perf/urgent] perf/core: Make the mlock accounting simple again
The following commit has been merged into the perf/urgent branch of tip:
Commit-ID: c4b75479741c9c3a4f0abff5baa5013d27640ac1
Gitweb: https://git.kernel.org/tip/c4b75479741c9c3a4f0abff5baa5013d27640ac1
Author: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
AuthorDate: Wed, 20 Nov 2019 19:06:40 +02:00
Committer: Ingo Molnar <mingo@...nel.org>
CommitterDate: Thu, 21 Nov 2019 07:37:50 +01:00
perf/core: Make the mlock accounting simple again
Commit:
d44248a41337 ("perf/core: Rework memory accounting in perf_mmap()")
does a lot of things to the mlock accounting arithmetics, while the only
thing that actually needed to happen is subtracting the part that is
charged to the mm from the part that is charged to the user, so that the
former isn't charged twice.
Signed-off-by: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Acked-by: Song Liu <songliubraving@...com>
Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Wanpeng Li <wanpengli@...cent.com>
Cc: Yauheni Kaliuta <yauheni.kaliuta@...hat.com>
Cc: songliubraving@...com
Link: https://lkml.kernel.org/r/20191120170640.54123-1-alexander.shishkin@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
kernel/events/core.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 8f66a48..7e8980d 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -5825,13 +5825,7 @@ accounting:
user_locked = atomic_long_read(&user->locked_vm) + user_extra;
- if (user_locked <= user_lock_limit) {
- /* charge all to locked_vm */
- } else if (atomic_long_read(&user->locked_vm) >= user_lock_limit) {
- /* charge all to pinned_vm */
- extra = user_extra;
- user_extra = 0;
- } else {
+ if (user_locked > user_lock_limit) {
/*
* charge locked_vm until it hits user_lock_limit;
* charge the rest from pinned_vm
Powered by blists - more mailing lists