From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932324AbcEXJFg (ORCPT ); Tue, 24 May 2016 05:05:36 -0400 Received: from mail-am1on0118.outbound.protection.outlook.com ([157.56.112.118]:64432 "EHLO emea01-am1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932271AbcEXJFa (ORCPT ); Tue, 24 May 2016 05:05:30 -0400 Authentication-Results: linux-foundation.org; dkim=none (message not signed) header.d=none;linux-foundation.org; dmarc=none action=none header.from=virtuozzo.com; From: Vladimir Davydov To: Andrew Morton CC: Alexander Viro , Johannes Weiner , Michal Hocko , , , , , Subject: [PATCH RESEND 7/8] pipe: account to kmemcg Date: Tue, 24 May 2016 11:49:29 +0300 Message-ID: <2c2545563b6201f118946f96dd8cfc90e564aff6.1464079538.git.vdavydov@virtuozzo.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [195.214.232.10] X-ClientProxiedBy: VI1PR0901CA0081.eurprd09.prod.outlook.com (10.167.203.177) To VI1PR08MB0592.eurprd08.prod.outlook.com (10.163.169.22) X-MS-Office365-Filtering-Correlation-Id: 99547187-804a-4756-8736-08d383b05b26 X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB0592;2:7EN4+os9OXNCPZjHxLWeXUMtzRvCSHWeF2Oev6EMJi6Ou/JNCAyMfFyJyy+NV8MIMLZcEJ8TAYlTN75qYc/tOG+r4qrEFrrqDTETHo7DveN3Dc5DiKuURvEpBybeAFCcM1Yw7aFY2GQAnLMEyJqtXHv6IPiWoQYEMN1zRuJSXY7zbZwdPA9anTVMw80R7DEE;3:mGuKFOQd0YrBSkdiBAGWAgbHB6rZdoEkkh7GVQ41hzF32V5c6fbL3ON3alD1eEXPnO/4JJ79MDeuBu0uRHejgM5eynbIq+Ssn+hUk46hs15Qke/BBH+SKJuQIE5mtB40;25:tBtAppzCeGVbxl7TexHlBxvWN5YG8T6lRTVktccBNp8oOefgP3J6gYnR0TPCyZR0Lj4gE6ZPIFudKijEAaKFKFbDZtDC01o0AP5IoPa16T7T33nmPBNWGRzTw3vpfPxNWx73jHb8M5Hq+NDODMdOA285S14E/vsm1nAipMi8pAG/5pgdyQQ01VEPvbeTBVZcgd6dnFayNuJx8HpZT9yVLOVJMfdK4YWfHAh9YBCBCARxb2t91vU0JmT9GyfSZygX40WhA4+Ochf4oNKwBhDfuG5FZAnrhAhvegyIufcK/ZqIq2annMEJaXEP0p7RiRz3bcHRpeULvH7eModM8/z2sfgiq/slD4d8ejeLgv5+avrj18oQKhQ2guafG6+SgyZyWuq8k5PdeyLXBSI4eRCaf5ZEf5/f3vRFlLPA3e2atRA= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:VI1PR08MB0592; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040130)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6041072)(6043046);SRVR:VI1PR08MB0592;BCL:0;PCL:0;RULEID:;SRVR:VI1PR08MB0592; X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB0592;4:89HjH1A7laLl3Hax4aQWwGaqvsWWKtewjBFEXy555nu0n55Dr+Rak+h5zjsacy8PJmq/aCgZ6uLHSr6xrnMDftLJ8aaM0ZxzMGdk15DF5C8eVzVY9T/8MMnpziz5TtdE+n61GLvrk1lOKpPJmi5zw7VA72n49Ae7PO2gRXVC55vFWjwW7r7sW1FJ0X4z2+uj52Xnv+5dxnvSIcrPVVdroZPqDYwqALR4BiM0QH8iYa7lvgjaKHb/j3w8JxMBMZOt97T3TaDqMvhzzubjtZMWi+H1T7hWdEbhCIi/2Z6c3273taPtc+CGI6r5akbWzO3/Ry8WtjibcvY3SXWfIsy3gdrt/+5zBYXcJ/uOqwyl0H9fiqskK+Hsj6zmtzG0DZPkS6a3eWsjzc4xcuc8iDVu+cZvMcB09h9TIYaaW+fwqlg= X-Forefront-PRVS: 09525C61DB X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6009001)(586003)(36756003)(3846002)(6116002)(2950100001)(77096005)(76176999)(50986999)(575784001)(86362001)(110136002)(92566002)(19580405001)(118296001)(19580395003)(5008740100001)(189998001)(229853001)(2906002)(15650500001)(4326007)(47776003)(5004730100002)(66066001)(50466002)(8676002)(80792005)(5003940100001)(33646002)(81166006)(42186005)(48376002)(50226002)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:VI1PR08MB0592;H:virtuozzo.com;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;VI1PR08MB0592;23:wBZIgfvE5TAGWA1r8cjSLF44eHHj7n3sa4MCYp3PO?= =?us-ascii?Q?RyLQfuI85RMpNWU+O4oukgJDXTLF9XaXzD8OKitXNlmmo4USRXgaqOC61ip2?= =?us-ascii?Q?+G5c+yt1YFPmkTjbZWRrpm20sSfuSUvtL83dbrE3xdxkwZwZQyTmAQjaBzbs?= =?us-ascii?Q?DhVyPViMh8DHDydZC1JY0BRmsi3dTTdYUcWrONPDTofAMrCeHSC8PGYEu8JZ?= =?us-ascii?Q?csUJMpFK4Gd2aJ8sPOGEPphVOVzzu3neS1YSPZv1h2RKENYNThQUnKFCiefB?= =?us-ascii?Q?9kebw//MtOJ0pUfU8MzH9+UEvfrlHwCoNz79fn6GVIKgp35JkM8CVauUvW2O?= =?us-ascii?Q?mTvSZ5R9dRJ0ffUeUKmQlDlQ9U/hhamCu314A4pX54xTEDOtGz67j8byluOi?= =?us-ascii?Q?xtTgnJVKlPfE8jx/bVpBb7DEM+uTdfFHfoA9NciXoEX5LoK34LJ1RT1nk/pI?= =?us-ascii?Q?SrRbRm+jIdvlkbxDcGM9qyKfC3+jjMHR4yDk8SyWczht7VII3+NSjN3o6qHb?= =?us-ascii?Q?BVeBvMcLPiRou3w5aYC0070mMtphzxm9eFjNRglZy552F8L8PxXG4wXCT0oq?= =?us-ascii?Q?oilrmIfIiqfUF4uqSobhxKE47ixPpHGWoQDyljqhkVvEYUpQ4Nl6bVwBOaWf?= =?us-ascii?Q?NBecEHe9pqgn9ANbkxGHh+d7nEisBXVq5y+tXJxQUakAJXQd7hnhlgI+wT1R?= =?us-ascii?Q?KqpBNAhd32BNjqsOIIyt9pzm9oT62UPCHHMNCpaZCONFrOLsPhoXCTUe4JDg?= =?us-ascii?Q?ZDptOGoPSEmsqUT9mlauQcW1d8FGc50rqeNZDsocDUjwOb/mQvKbWOVVtYks?= =?us-ascii?Q?Ox0h/ntky3hiHNn1tKtxby7q92ilerBMDeMxpZKdIe8GXc5ttXcMsLO1OwRG?= =?us-ascii?Q?471+izJdKXpb5iWhR+NaukNdpadA5RuCd8kl9g2Ir4LS60W+QV0bwDdSB4aq?= =?us-ascii?Q?FhfHXSPW1vx8UMVy2YToiyu6nsJDywFZh4rmTL6zYHo3wWBJcJtiE5Z34rPO?= =?us-ascii?Q?9g=3D?= X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB0592;5:fNeuCrydHbaXxfYLcu/VmsS74sFTm4APiCjxr5TtTeUr//FcZfmJWGIPTAsyEdKzHix+CMO8hfpHcYqLhS+PeWx5nv4GM0U/zs+u4utGjLHrhMM++nwRryMgaSOq2OBDjNz50RTKMC1Edx/wXd+Scg==;24:yN6qwgJbAfG4Pzn1bgEVZnQ/oytdwRk6zYqNwWo3o5fQ3Rfl0lShtd9HdWp2vs3Lm8YpGJnqBJkTrwmwfmqzhDLdK2VnvdInl2u6ofd+W3M=;7:807cEr+3NKywlMfSj+8u+bjwruifZrpCurPaJmkmdP/sJZLLrN2a6AQlB7pf4fagZsfAfxAF6/Pqs5ivXm3DS77tCaCPkXbxaZ86OowK5vHKu44hwNBbJiK2v8z5jR/ykMsIRe+IkSse4xnN3oabJmiH/eHTwDnFx3DVlDjEno1rJmaLsGk6tJiG7pcbBwsn;20:iusYVtJHWv0j8cFYBfLFL3jP3KhsjSD60zQuFDO0il1DlLVSwJvV07P1YeUXjhhoI10kjw1v5tOatVGGtA5LoYHAAXlk2yY0a9AD58vOjMWiPQvUpfwi5RKaeSuh7CRn7UI4wXPsnas0IN6M68A0VROMsDmzdfxBz5Xh0k7pDiw= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2016 08:49:44.7512 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB0592 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Pipes can consume a significant amount of system memory, hence they should be accounted to kmemcg. This patch marks pipe_inode_info and anonymous pipe buffer page allocations as __GFP_ACCOUNT so that they would be charged to kmemcg. Note, since a pipe buffer page can be "stolen" and get reused for other purposes, including mapping to userspace, we clear PageKmemcg thus resetting page->_mapcount and uncharge it in anon_pipe_buf_steal, which is introduced by this patch. Signed-off-by: Vladimir Davydov Cc: Alexander Viro --- fs/pipe.c | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/fs/pipe.c b/fs/pipe.c index 0d3f5165cb0b..4b32928f5426 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -137,6 +138,22 @@ static void anon_pipe_buf_release(struct pipe_inode_info *pipe, put_page(page); } +static int anon_pipe_buf_steal(struct pipe_inode_info *pipe, + struct pipe_buffer *buf) +{ + struct page *page = buf->page; + + if (page_count(page) == 1) { + if (memcg_kmem_enabled()) { + memcg_kmem_uncharge(page, 0); + __ClearPageKmemcg(page); + } + __SetPageLocked(page); + return 0; + } + return 1; +} + /** * generic_pipe_buf_steal - attempt to take ownership of a &pipe_buffer * @pipe: the pipe that the buffer belongs to @@ -219,7 +236,7 @@ static const struct pipe_buf_operations anon_pipe_buf_ops = { .can_merge = 1, .confirm = generic_pipe_buf_confirm, .release = anon_pipe_buf_release, - .steal = generic_pipe_buf_steal, + .steal = anon_pipe_buf_steal, .get = generic_pipe_buf_get, }; @@ -227,7 +244,7 @@ static const struct pipe_buf_operations packet_pipe_buf_ops = { .can_merge = 0, .confirm = generic_pipe_buf_confirm, .release = anon_pipe_buf_release, - .steal = generic_pipe_buf_steal, + .steal = anon_pipe_buf_steal, .get = generic_pipe_buf_get, }; @@ -405,7 +422,7 @@ pipe_write(struct kiocb *iocb, struct iov_iter *from) int copied; if (!page) { - page = alloc_page(GFP_HIGHUSER); + page = alloc_page(GFP_HIGHUSER | __GFP_ACCOUNT); if (unlikely(!page)) { ret = ret ? : -ENOMEM; break; @@ -611,7 +628,7 @@ struct pipe_inode_info *alloc_pipe_info(void) { struct pipe_inode_info *pipe; - pipe = kzalloc(sizeof(struct pipe_inode_info), GFP_KERNEL); + pipe = kzalloc(sizeof(struct pipe_inode_info), GFP_KERNEL_ACCOUNT); if (pipe) { unsigned long pipe_bufs = PIPE_DEF_BUFFERS; struct user_struct *user = get_current_user(); @@ -619,7 +636,9 @@ struct pipe_inode_info *alloc_pipe_info(void) if (!too_many_pipe_buffers_hard(user)) { if (too_many_pipe_buffers_soft(user)) pipe_bufs = 1; - pipe->bufs = kzalloc(sizeof(struct pipe_buffer) * pipe_bufs, GFP_KERNEL); + pipe->bufs = kcalloc(pipe_bufs, + sizeof(struct pipe_buffer), + GFP_KERNEL_ACCOUNT); } if (pipe->bufs) { @@ -1010,7 +1029,8 @@ static long pipe_set_size(struct pipe_inode_info *pipe, unsigned long nr_pages) if (nr_pages < pipe->nrbufs) return -EBUSY; - bufs = kcalloc(nr_pages, sizeof(*bufs), GFP_KERNEL | __GFP_NOWARN); + bufs = kcalloc(nr_pages, sizeof(*bufs), + GFP_KERNEL_ACCOUNT | __GFP_NOWARN); if (unlikely(!bufs)) return -ENOMEM; -- 2.1.4 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vladimir Davydov Subject: [PATCH RESEND 7/8] pipe: account to kmemcg Date: Tue, 24 May 2016 11:49:29 +0300 Message-ID: <2c2545563b6201f118946f96dd8cfc90e564aff6.1464079538.git.vdavydov@virtuozzo.com> References: Mime-Version: 1.0 Content-Type: text/plain Cc: Alexander Viro , Johannes Weiner , Michal Hocko , , , , , To: Andrew Morton Return-path: In-Reply-To: Sender: owner-linux-mm@kvack.org List-Id: netdev.vger.kernel.org Pipes can consume a significant amount of system memory, hence they should be accounted to kmemcg. This patch marks pipe_inode_info and anonymous pipe buffer page allocations as __GFP_ACCOUNT so that they would be charged to kmemcg. Note, since a pipe buffer page can be "stolen" and get reused for other purposes, including mapping to userspace, we clear PageKmemcg thus resetting page->_mapcount and uncharge it in anon_pipe_buf_steal, which is introduced by this patch. Signed-off-by: Vladimir Davydov Cc: Alexander Viro --- fs/pipe.c | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/fs/pipe.c b/fs/pipe.c index 0d3f5165cb0b..4b32928f5426 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -137,6 +138,22 @@ static void anon_pipe_buf_release(struct pipe_inode_info *pipe, put_page(page); } +static int anon_pipe_buf_steal(struct pipe_inode_info *pipe, + struct pipe_buffer *buf) +{ + struct page *page = buf->page; + + if (page_count(page) == 1) { + if (memcg_kmem_enabled()) { + memcg_kmem_uncharge(page, 0); + __ClearPageKmemcg(page); + } + __SetPageLocked(page); + return 0; + } + return 1; +} + /** * generic_pipe_buf_steal - attempt to take ownership of a &pipe_buffer * @pipe: the pipe that the buffer belongs to @@ -219,7 +236,7 @@ static const struct pipe_buf_operations anon_pipe_buf_ops = { .can_merge = 1, .confirm = generic_pipe_buf_confirm, .release = anon_pipe_buf_release, - .steal = generic_pipe_buf_steal, + .steal = anon_pipe_buf_steal, .get = generic_pipe_buf_get, }; @@ -227,7 +244,7 @@ static const struct pipe_buf_operations packet_pipe_buf_ops = { .can_merge = 0, .confirm = generic_pipe_buf_confirm, .release = anon_pipe_buf_release, - .steal = generic_pipe_buf_steal, + .steal = anon_pipe_buf_steal, .get = generic_pipe_buf_get, }; @@ -405,7 +422,7 @@ pipe_write(struct kiocb *iocb, struct iov_iter *from) int copied; if (!page) { - page = alloc_page(GFP_HIGHUSER); + page = alloc_page(GFP_HIGHUSER | __GFP_ACCOUNT); if (unlikely(!page)) { ret = ret ? : -ENOMEM; break; @@ -611,7 +628,7 @@ struct pipe_inode_info *alloc_pipe_info(void) { struct pipe_inode_info *pipe; - pipe = kzalloc(sizeof(struct pipe_inode_info), GFP_KERNEL); + pipe = kzalloc(sizeof(struct pipe_inode_info), GFP_KERNEL_ACCOUNT); if (pipe) { unsigned long pipe_bufs = PIPE_DEF_BUFFERS; struct user_struct *user = get_current_user(); @@ -619,7 +636,9 @@ struct pipe_inode_info *alloc_pipe_info(void) if (!too_many_pipe_buffers_hard(user)) { if (too_many_pipe_buffers_soft(user)) pipe_bufs = 1; - pipe->bufs = kzalloc(sizeof(struct pipe_buffer) * pipe_bufs, GFP_KERNEL); + pipe->bufs = kcalloc(pipe_bufs, + sizeof(struct pipe_buffer), + GFP_KERNEL_ACCOUNT); } if (pipe->bufs) { @@ -1010,7 +1029,8 @@ static long pipe_set_size(struct pipe_inode_info *pipe, unsigned long nr_pages) if (nr_pages < pipe->nrbufs) return -EBUSY; - bufs = kcalloc(nr_pages, sizeof(*bufs), GFP_KERNEL | __GFP_NOWARN); + bufs = kcalloc(nr_pages, sizeof(*bufs), + GFP_KERNEL_ACCOUNT | __GFP_NOWARN); if (unlikely(!bufs)) return -ENOMEM; -- 2.1.4 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f72.google.com (mail-lf0-f72.google.com [209.85.215.72]) by kanga.kvack.org (Postfix) with ESMTP id 84F1B6B0268 for ; Tue, 24 May 2016 04:49:52 -0400 (EDT) Received: by mail-lf0-f72.google.com with SMTP id k186so5527437lfe.3 for ; Tue, 24 May 2016 01:49:52 -0700 (PDT) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0096.outbound.protection.outlook.com. [104.47.1.96]) by mx.google.com with ESMTPS id 71si22108338wmr.122.2016.05.24.01.49.46 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 24 May 2016 01:49:46 -0700 (PDT) From: Vladimir Davydov Subject: [PATCH RESEND 7/8] pipe: account to kmemcg Date: Tue, 24 May 2016 11:49:29 +0300 Message-ID: <2c2545563b6201f118946f96dd8cfc90e564aff6.1464079538.git.vdavydov@virtuozzo.com> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain Sender: owner-linux-mm@kvack.org List-ID: To: Andrew Morton Cc: Alexander Viro , Johannes Weiner , Michal Hocko , linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org Pipes can consume a significant amount of system memory, hence they should be accounted to kmemcg. This patch marks pipe_inode_info and anonymous pipe buffer page allocations as __GFP_ACCOUNT so that they would be charged to kmemcg. Note, since a pipe buffer page can be "stolen" and get reused for other purposes, including mapping to userspace, we clear PageKmemcg thus resetting page->_mapcount and uncharge it in anon_pipe_buf_steal, which is introduced by this patch. Signed-off-by: Vladimir Davydov Cc: Alexander Viro --- fs/pipe.c | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/fs/pipe.c b/fs/pipe.c index 0d3f5165cb0b..4b32928f5426 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -137,6 +138,22 @@ static void anon_pipe_buf_release(struct pipe_inode_info *pipe, put_page(page); } +static int anon_pipe_buf_steal(struct pipe_inode_info *pipe, + struct pipe_buffer *buf) +{ + struct page *page = buf->page; + + if (page_count(page) == 1) { + if (memcg_kmem_enabled()) { + memcg_kmem_uncharge(page, 0); + __ClearPageKmemcg(page); + } + __SetPageLocked(page); + return 0; + } + return 1; +} + /** * generic_pipe_buf_steal - attempt to take ownership of a &pipe_buffer * @pipe: the pipe that the buffer belongs to @@ -219,7 +236,7 @@ static const struct pipe_buf_operations anon_pipe_buf_ops = { .can_merge = 1, .confirm = generic_pipe_buf_confirm, .release = anon_pipe_buf_release, - .steal = generic_pipe_buf_steal, + .steal = anon_pipe_buf_steal, .get = generic_pipe_buf_get, }; @@ -227,7 +244,7 @@ static const struct pipe_buf_operations packet_pipe_buf_ops = { .can_merge = 0, .confirm = generic_pipe_buf_confirm, .release = anon_pipe_buf_release, - .steal = generic_pipe_buf_steal, + .steal = anon_pipe_buf_steal, .get = generic_pipe_buf_get, }; @@ -405,7 +422,7 @@ pipe_write(struct kiocb *iocb, struct iov_iter *from) int copied; if (!page) { - page = alloc_page(GFP_HIGHUSER); + page = alloc_page(GFP_HIGHUSER | __GFP_ACCOUNT); if (unlikely(!page)) { ret = ret ? : -ENOMEM; break; @@ -611,7 +628,7 @@ struct pipe_inode_info *alloc_pipe_info(void) { struct pipe_inode_info *pipe; - pipe = kzalloc(sizeof(struct pipe_inode_info), GFP_KERNEL); + pipe = kzalloc(sizeof(struct pipe_inode_info), GFP_KERNEL_ACCOUNT); if (pipe) { unsigned long pipe_bufs = PIPE_DEF_BUFFERS; struct user_struct *user = get_current_user(); @@ -619,7 +636,9 @@ struct pipe_inode_info *alloc_pipe_info(void) if (!too_many_pipe_buffers_hard(user)) { if (too_many_pipe_buffers_soft(user)) pipe_bufs = 1; - pipe->bufs = kzalloc(sizeof(struct pipe_buffer) * pipe_bufs, GFP_KERNEL); + pipe->bufs = kcalloc(pipe_bufs, + sizeof(struct pipe_buffer), + GFP_KERNEL_ACCOUNT); } if (pipe->bufs) { @@ -1010,7 +1029,8 @@ static long pipe_set_size(struct pipe_inode_info *pipe, unsigned long nr_pages) if (nr_pages < pipe->nrbufs) return -EBUSY; - bufs = kcalloc(nr_pages, sizeof(*bufs), GFP_KERNEL | __GFP_NOWARN); + bufs = kcalloc(nr_pages, sizeof(*bufs), + GFP_KERNEL_ACCOUNT | __GFP_NOWARN); if (unlikely(!bufs)) return -ENOMEM; -- 2.1.4 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org