[Devel] [PATCH RHEL7 COMMIT] fs: fix accounting pipe buffers to kmemcg

Konstantin Khorenko khorenko at virtuozzo.com
Mon May 2 07:08:30 PDT 2016


The commit is pushed to "branch-rh7-3.10.0-327.10.1.vz7.12.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-327.10.1.vz7.12.16
------>
commit 801bc1994941fa0cd47c64047ae0faf29084d4d5
Author: Vladimir Davydov <vdavydov at virtuozzo.com>
Date:   Mon May 2 18:08:30 2016 +0400

    fs: fix accounting pipe buffers to kmemcg
    
    After we switched to the whitelist kmem accounting design, using
    alloc_kmem_pages is not enough for the new page to be accounted -
    one must also pass __GFP_ACCOUNT in gfp flags.
    
    Signed-off-by: Vladimir Davydov <vdavydov at virtuozzo.com>
---
 fs/pipe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/pipe.c b/fs/pipe.c
index 57aa78e..d038ff8 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -590,7 +590,7 @@ redo1:
 			size_t remaining;
 
 			if (!page) {
-				page = alloc_kmem_pages(GFP_HIGHUSER, 0);
+				page = alloc_kmem_pages(GFP_HIGHUSER | __GFP_ACCOUNT, 0);
 				if (unlikely(!page)) {
 					ret = ret ? : -ENOMEM;
 					break;


More information about the Devel mailing list