[Devel] [PATCH RHEL7 COMMIT] pfcache/ub: account pfcache peer files in ub0
Konstantin Khorenko
khorenko at virtuozzo.com
Fri Jan 20 06:54:48 PST 2017
The commit is pushed to "branch-rh7-3.10.0-514.6.1.vz7.28.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-514.6.1.vz7.28.2
------>
commit 68ca8fac8e49f0234550a2c93e17a4585d24fd75
Author: Andrey Ryabinin <aryabinin at virtuozzo.com>
Date: Fri Jan 20 18:54:48 2017 +0400
pfcache/ub: account pfcache peer files in ub0
Pfcache's peer files is a shared resource, thus it shouldn't be accounted
per-container.
This makes peer files to be accounted in ub0, the same way as it is in PSBM6.
https://jira.sw.ru/browse/PSBM-56167
Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
---
mm/memory.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/mm/memory.c b/mm/memory.c
index b408ff27..6034045 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -3813,10 +3813,13 @@ int open_mapping_peer(struct address_space *mapping,
struct inode *inode = path->dentry->d_inode;
struct address_space *peer = inode->i_mapping;
struct file *file = NULL;
+ struct user_beancounter *ub;
restart:
if (!peer->i_peer_file) {
+ ub = set_exec_ub(&ub0);
file = dentry_open(path, O_RDONLY | O_LARGEFILE, cred);
+ set_exec_ub(ub);
if (IS_ERR(file)) {
return PTR_ERR(file);
}
More information about the Devel
mailing list