From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754921AbcEXJE3 (ORCPT ); Tue, 24 May 2016 05:04:29 -0400 Received: from mail-am1on0142.outbound.protection.outlook.com ([157.56.112.142]:2624 "EHLO emea01-am1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751416AbcEXJEZ (ORCPT ); Tue, 24 May 2016 05:04:25 -0400 X-Greylist: delayed 3006 seconds by postgrey-1.27 at vger.kernel.org; Tue, 24 May 2016 05:04:24 EDT 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: Johannes Weiner , Michal Hocko , , , , , Subject: [PATCH RESEND 0/8] More stuff to charge to kmemcg Date: Tue, 24 May 2016 11:49:22 +0300 Message-ID: X-Mailer: git-send-email 2.1.4 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: e3bd57cf-9495-4bfa-6d33-08d383b055a5 X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB0592;2:h4Umokr0GBs/IfgbMCdNnv9qY8yI2UQkDKjeDxeytTHbvPB0s7XEzEhUj1MQTAshGaUITOp4kqVZV4m9sxJ6mfFJpX1SLrZEPJvJY6UeYLf7P+kTu668zGKHSlP7yOxSOgn4V0hax7Q8AlZeTrYPSFJHJ48+3rdusF8WvKbyNeg/TCNvmbF68Eif6/2TOH5b;3:clg8v0akg72NH8pXQdblMNJXatnjvXmm6PsUf1WfXQLmKVXbq/VwEVfArq5XW7sEfN+Tv8KqBZt7e9SLGaxYshpyKrfHNJ8U5SzoRbq3eBY9WCybO08P+gJWWekX6DCB;25:1pvxh0M20Kk8LpkwzvQI6dP3eMMJI2oiDGbJ5Er2Lu7maHbc/rW4Q/NA00fC25j3Fz4h/sl4yoSgDVHTlpZGv5DE0Pe+NlFE1w4l5IAIDM4p6JVW3ybhJa1admf2oYBp/R2IKKHmhoiadLt6KObOhjPO/SsNIkMUHLC0Awyec78Y1v4hLog2NClQfP/m2tP/jltjEz9EAouX4/Zd+mHNaVAl8WLbjaC49b3K97c1UJKwRcPpuXaIfTRwJW9ZJgQSyj47rjDZhs+JVLBlVOtTCtQPVgscbh4pGL3PLrbb1PeVRtHQPVtyTmwOCaXTfovf40tg394wpnLW8SbawkKRNkIHx4kwslTcL9VVYhLwVKJTEhvL07ecJqD3flZa9nBIeWETCi47W0RIm1Ss6vqEZ2hqRq9M0F2hsly1/ru7D6U= 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:hT4je3RRIjFKmODKWwKBs+w0BJ/SpW+AcrhVKDH9q5PLiTFftGGTWiRIJvdBbGi0Z1OGq+ssBZoQPdO2DwTPcGdfgJUrFLASI7k3mmvGbqfpRUPZyAjdzb5hi3y24EJ3NTo2+Uepv+yaz/lo6czWHXJ/BxHorUk0Wpx/wxflT/R9Z9yglvqA8C9DMwNPASHJ9TcZ8xcVoZxZsXw9YDWTnQbeX0jD/VIZruKJD2fLYnEw9IOOK3Smbw8/V9sDxoJPz37ZElOgHWrbrlmDbJ4OukI+OXtKG06jiWKeHCzD4fVMVlVttu1XNqIKIc6iv4FHeOMzDfexXaZvK3e/9JofNZuOvC/3CvL0HuGPFPGwq0BOw2V5mrNkiQFpPr2bIiQUET38QQhCncxwPcSm6hLpVFlTJnS9huBo/8Lqge2p1yw= X-Forefront-PRVS: 09525C61DB X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6009001)(586003)(36756003)(3846002)(6116002)(77096005)(50986999)(15975445007)(86362001)(110136002)(92566002)(19580405001)(19580395003)(5008740100001)(189998001)(229853001)(2906002)(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: 1;VI1PR08MB0592;23:mSJCFBzxasv9h7mbfx2vDI6VeG/CFJbr5PkzLSsUqFfrXE43jyRI7s2pVrPyDBsrm7MHvjbAnzMCCIoC/CUVBNaDZtzycwhemrrCMS6OR2DI2OyQIjIYJiU+kytNIXfw3pS622Z+ZvkawYXr0wXqFzRsG8VLI57BUzG2++AZaoV9BERT7XdiBL8mgF/ISW+cv4hWMcBrSDm5KpLAnQqBhM5LcyXdBHR2BwnZZEovzmIiwZT7CyN8sU5B5PwkmfC7LwGZJFIrmjsa98sUz3zU1kWP3psWlvRYZAiy4T5bA3FtlJdbEAngQNYUIKYUzRny8Dl7yz81+MoI/SF6YuUZIB/2CBw1sYI0ZqcIblBjM4X8fiJFxk3yDoWSyu306upL5poiRXO8jwRJzeIYj+3x+S8xZrzSzb03O3OU4q5JKliUyqPDCNb+DtuZFDBMuujL3sd8yrXLeTDIR2wsl2F+g1Schy2w27h8UAvhkLK6Q3wzzmNojH9/5LQfG8sEn3OtEyuMQaOZoQCvLhrrl0dCcDICGqSC5AJbdziWbUZZirLpACUGrS0uBOPTL/WJkCK8Y47hojguvxZiDIWP+3pPHYozertIP5CWL+kAdebGTeep6yQRACo2nKDW0ig+PW2x5hr9HrA4epTp5TgkoJt5vodT1DD7vdwze6Lnowz3C0WRVdflowMmmVh2rYUkgfUbWqkTR6eWgImq0ei0Ir1/2/K5cMFKHbuF/3Ua7u+rWU7BBQrjju39Lip7FmlqpWTXSX8uchEMLjrbyFCEcw38T1YDcuwJm04iAqbHjfSBk2N617JLyewDJjZ6oG7Hge8QIguBOAAQrv1mRaGW2ctaQS3UeMlslGjPG/BqJyBI/jv8x1jTYbx2xMVqRlAscODK0XjZBeIaV0P4cfi4zIhZzg== X-Microsoft-Exchange-Diagnostics: 1;VI1PR08MB0592;5:lTr8vDpQibuvL/CoxUtbK/ydG4HcIwjYOjsY6bd4wrpXoPAJiHAeqM93xFqhvfO/Dhbk39/V7A9sE/sKj+hD4BhRtLqCiP1R4pEpPB5+a1r9eX26MA41LxHhMJlJPDbNaGIK1xcnLdzrEP/Au/9Rrg==;24:4JQBYdI9rAG5xnZS9o7DWyaeBUmTBW9aw4KaUZd8kFvD2UujfbQ77nuJf+WK6ZC5FCfILWeRPvEOAvX2IfbuxT/1nLexykB7cgXZNfiql70=;7:UwUBPGnkccPKvUULtj9W/EMifjDk76owDXM7AoHkcU/Hba2D4SuOoWn9sazEqAfx7wM2jLkk30zCbJtHiIPT1v4lj0QLqYNDz/Anq8Glx4i1ZpS+1rrdRNgvDOAGw6QHY2qZS/k6raEY+8Ezfi9OmCF5h22cKhdy7jcl+RUc6OZh6oVmvp/MVuKuoG0nEBRA;20:Yz79CuQ2YMP1dK+EaU2Vv5/9it8xj9yh6cZjnVQ5ENo/K5kNOSN0o9lcWwBoAm2yS/JyPmT6uoDgz3HRcAcPZaG3xtW44PdOsIw9XXLTC6+u4xTzdx0MjEvu94IFN5jcIvrtuLHCRpuU2UDIw59uWsQbCFx6pE9nt/wKvO4EEJ8= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2016 08:49:35.5634 (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 [resending with all relevant lists in Cc] Hi, This patch implements per kmemcg accounting of page tables (x86-only), pipe buffers, and unix socket buffers. Basically, this is v2 of my earlier attempt [1], addressing comments by Andrew, namely: lack of comments to non-standard _mapcount usage, extra overhead even when kmemcg is unused, wrong handling of stolen pipe buffer pages. Patches 1-3 are just cleanups that are not supposed to introduce any functional changes. Patches 4 and 5 move charge/uncharge to generic page allocator paths for the sake of accounting pipe and unix socket buffers. Patches 5-7 make x86 page tables, pipe buffers, and unix socket buffers accountable. [1] http://lkml.kernel.org/r/%3Ccover.1443262808.git.vdavydov@parallels.com%3E Thanks, Vladimir Davydov (8): mm: remove pointless struct in struct page definition mm: clean up non-standard page->_mapcount users mm: memcontrol: cleanup kmem charge functions mm: charge/uncharge kmemcg from generic page allocator paths mm: memcontrol: teach uncharge_list to deal with kmem pages arch: x86: charge page tables to kmemcg pipe: account to kmemcg af_unix: charge buffers to kmemcg arch/x86/include/asm/pgalloc.h | 12 ++++- arch/x86/mm/pgtable.c | 11 ++-- fs/pipe.c | 32 ++++++++--- include/linux/gfp.h | 10 +--- include/linux/memcontrol.h | 103 +++--------------------------------- include/linux/mm_types.h | 73 ++++++++++++------------- include/linux/page-flags.h | 78 +++++++++++++-------------- kernel/fork.c | 6 +-- mm/memcontrol.c | 117 ++++++++++++++++++++++++++++------------- mm/page_alloc.c | 63 +++++----------------- mm/slab.h | 16 ++++-- mm/slab_common.c | 2 +- mm/slub.c | 6 +-- mm/vmalloc.c | 6 +-- net/unix/af_unix.c | 1 + scripts/tags.sh | 3 ++ 16 files changed, 245 insertions(+), 294 deletions(-) -- 2.1.4 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vladimir Davydov Subject: [PATCH RESEND 0/8] More stuff to charge to kmemcg Date: Tue, 24 May 2016 11:49:22 +0300 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Cc: Johannes Weiner , Michal Hocko , , , , , To: Andrew Morton Return-path: Sender: owner-linux-mm@kvack.org List-Id: netdev.vger.kernel.org [resending with all relevant lists in Cc] Hi, This patch implements per kmemcg accounting of page tables (x86-only), pipe buffers, and unix socket buffers. Basically, this is v2 of my earlier attempt [1], addressing comments by Andrew, namely: lack of comments to non-standard _mapcount usage, extra overhead even when kmemcg is unused, wrong handling of stolen pipe buffer pages. Patches 1-3 are just cleanups that are not supposed to introduce any functional changes. Patches 4 and 5 move charge/uncharge to generic page allocator paths for the sake of accounting pipe and unix socket buffers. Patches 5-7 make x86 page tables, pipe buffers, and unix socket buffers accountable. [1] http://lkml.kernel.org/r/%3Ccover.1443262808.git.vdavydov@parallels.com%3E Thanks, Vladimir Davydov (8): mm: remove pointless struct in struct page definition mm: clean up non-standard page->_mapcount users mm: memcontrol: cleanup kmem charge functions mm: charge/uncharge kmemcg from generic page allocator paths mm: memcontrol: teach uncharge_list to deal with kmem pages arch: x86: charge page tables to kmemcg pipe: account to kmemcg af_unix: charge buffers to kmemcg arch/x86/include/asm/pgalloc.h | 12 ++++- arch/x86/mm/pgtable.c | 11 ++-- fs/pipe.c | 32 ++++++++--- include/linux/gfp.h | 10 +--- include/linux/memcontrol.h | 103 +++--------------------------------- include/linux/mm_types.h | 73 ++++++++++++------------- include/linux/page-flags.h | 78 +++++++++++++-------------- kernel/fork.c | 6 +-- mm/memcontrol.c | 117 ++++++++++++++++++++++++++++------------- mm/page_alloc.c | 63 +++++----------------- mm/slab.h | 16 ++++-- mm/slab_common.c | 2 +- mm/slub.c | 6 +-- mm/vmalloc.c | 6 +-- net/unix/af_unix.c | 1 + scripts/tags.sh | 3 ++ 16 files changed, 245 insertions(+), 294 deletions(-) -- 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-wm0-f70.google.com (mail-wm0-f70.google.com [74.125.82.70]) by kanga.kvack.org (Postfix) with ESMTP id 2BC066B0005 for ; Tue, 24 May 2016 04:49:39 -0400 (EDT) Received: by mail-wm0-f70.google.com with SMTP id 81so7225356wms.3 for ; Tue, 24 May 2016 01:49:39 -0700 (PDT) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0134.outbound.protection.outlook.com. [104.47.1.134]) by mx.google.com with ESMTPS id k5si22207139wmg.1.2016.05.24.01.49.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 24 May 2016 01:49:37 -0700 (PDT) From: Vladimir Davydov Subject: [PATCH RESEND 0/8] More stuff to charge to kmemcg Date: Tue, 24 May 2016 11:49:22 +0300 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Sender: owner-linux-mm@kvack.org List-ID: To: Andrew Morton Cc: 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 [resending with all relevant lists in Cc] Hi, This patch implements per kmemcg accounting of page tables (x86-only), pipe buffers, and unix socket buffers. Basically, this is v2 of my earlier attempt [1], addressing comments by Andrew, namely: lack of comments to non-standard _mapcount usage, extra overhead even when kmemcg is unused, wrong handling of stolen pipe buffer pages. Patches 1-3 are just cleanups that are not supposed to introduce any functional changes. Patches 4 and 5 move charge/uncharge to generic page allocator paths for the sake of accounting pipe and unix socket buffers. Patches 5-7 make x86 page tables, pipe buffers, and unix socket buffers accountable. [1] http://lkml.kernel.org/r/%3Ccover.1443262808.git.vdavydov@parallels.com%3E Thanks, Vladimir Davydov (8): mm: remove pointless struct in struct page definition mm: clean up non-standard page->_mapcount users mm: memcontrol: cleanup kmem charge functions mm: charge/uncharge kmemcg from generic page allocator paths mm: memcontrol: teach uncharge_list to deal with kmem pages arch: x86: charge page tables to kmemcg pipe: account to kmemcg af_unix: charge buffers to kmemcg arch/x86/include/asm/pgalloc.h | 12 ++++- arch/x86/mm/pgtable.c | 11 ++-- fs/pipe.c | 32 ++++++++--- include/linux/gfp.h | 10 +--- include/linux/memcontrol.h | 103 +++--------------------------------- include/linux/mm_types.h | 73 ++++++++++++------------- include/linux/page-flags.h | 78 +++++++++++++-------------- kernel/fork.c | 6 +-- mm/memcontrol.c | 117 ++++++++++++++++++++++++++++------------- mm/page_alloc.c | 63 +++++----------------- mm/slab.h | 16 ++++-- mm/slab_common.c | 2 +- mm/slub.c | 6 +-- mm/vmalloc.c | 6 +-- net/unix/af_unix.c | 1 + scripts/tags.sh | 3 ++ 16 files changed, 245 insertions(+), 294 deletions(-) -- 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