Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751956AbdGFOsS (ORCPT ); Thu, 6 Jul 2017 10:48:18 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:52093 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750970AbdGFOsP (ORCPT ); Thu, 6 Jul 2017 10:48:15 -0400 Authentication-Results: techsingularity.net; dkim=none (message not signed) header.d=none;techsingularity.net; dmarc=none action=none header.from=fb.com; Date: Thu, 6 Jul 2017 15:46:34 +0100 From: Roman Gushchin To: Mel Gorman CC: , Andrew Morton , Johannes Weiner , Michal Hocko , Vladimir Davydov , Rik van Riel , , Subject: Re: [PATCH] mm: make allocation counters per-order Message-ID: <20170706144634.GB14840@castle> References: <1499346271-15653-1-git-send-email-guro@fb.com> <20170706131941.omod4zl4cyuscmjo@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20170706131941.omod4zl4cyuscmjo@techsingularity.net> User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [2620:10d:c092:200::1:c422] X-ClientProxiedBy: VI1PR08CA0193.eurprd08.prod.outlook.com (2603:10a6:800:d2::23) To CO1PR15MB1077.namprd15.prod.outlook.com (2a01:111:e400:7b66::7) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0e4f1540-8616-4199-43fe-08d4c47dd8f9 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:CO1PR15MB1077; X-Microsoft-Exchange-Diagnostics: 1;CO1PR15MB1077;3:+ZmLtu0tlb4rvRciP8NdxceubFjq8Y5xR6pfNoUjLWCtCxvw51Axl+TLLofdM/OmoXAIPTEkr4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jS5uYW4a4MyyUByCOSx33Gw5jiSkdMYPpknka9WDcjXal5fIfDQ3s/iKsTnzKIsjiWuQt10eh50JT8ttxyP9T4xbHsbs3bjcT25BOk64p6t5wiGuAZcz8vL594F3aOkUXSHplvvyEcQIA9EQnMp9fGnx9qZsxaOJebVKU4il9kucpxKz9mFavrwhAn/SZ+KIQjia++ImFkLNnxaJXOoQ+1zf0RMX3o7mfI8U/rw/H2bXmNjQwsMpuswnOJh6AC7RGFg= X-Microsoft-Exchange-Diagnostics: 1;CO1PR15MB1077;20:aYNpLvZH8OADfQqrvEMLnqXX0DZU0+flqW0wzz+s0OWCWXvfjQzjZXdd6+0LHhfkG8pGLbzewiR2OIqyAHgA4nyqxtOWE3FH7sAaXLWhle933+MLUIrGWIi8IYfphIPSipj+3wiF3DwiOw+XKlmF+07mgXj26IScFu6Sp5log51Wsj2fY560716XQ7firt5zqZSnjDbSUz/ZUbLWDvNOZRfOaP2XIEI4iWZ+t3KtTzYwymumGNUczWEvtUY8DboVFgEkqf4h8Tzpydb5o45CpNAx3v0KbnEhkbcFwcakm9ibRa+0hJ+bGXSYhbBRXApt1WWN+QrXVc9+FY1inQLnKA2cO17Qt4YYuZKa/O4CKpGS7VEDkhsGkraVwpx7FfKtL72hl3h8pIJwHjXUXpMnCpGGp0VLU8tOSllfEROm9ufBSpDo4caIgDWBZbUZzAVsrtui5Pv5msGgGjXjeT8QmDyWeSdn7LTQ6uliZryZaw+eYCAwHW3iylPTJvuwaMNM X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236129657087228)(788757137089)(48057245064654)(148574349560750)(209349559609743)(247924648384137); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(10201501046)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123562025)(20161123560025)(20161123558100)(20161123555025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CO1PR15MB1077;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CO1PR15MB1077; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CO1PR15MB1077;4:iKmPO8cOq0qN5S6V2isZ5C+bGEey0g9SCY3mfjyxQK?= =?us-ascii?Q?VkvRAdSz1+xFlgRnLCIn9TsoQ3VbJk9isiqdwg3M6zqLhUpVjSN2JhV3JFxF?= =?us-ascii?Q?kW+OO4CsP64ZK9wmhCyk/Yl7Uw/OFOacO9NzgJ0+VO712K7iyrC4EOWcd9ZL?= =?us-ascii?Q?9Nu9F6t24C4UbMTYlMbwNEDwwG1ICiE0onNxHGExWy7+UceqGD5oz9SNPmyz?= =?us-ascii?Q?w72AuxkpnkqjfzCfOrmKZo7pJJWV1lHnapocxdROeQdyfkcH69nVRd+V+Bp9?= =?us-ascii?Q?nhPjyK3aLRGDjPDt4ebf2FVbjEtjM16vMmQtALf2SP/tIthRaLtAVRbYyVO7?= =?us-ascii?Q?jwoCc4I0PiLyFLQTRsUOyPFKbTjVny7cWTeSAL22OJ71l+lo8V/34H60NSm5?= =?us-ascii?Q?FjKjnwdPqVCMpQd7FONIXyexPNEr6UtoCLOac9QG2EKrT3d/w3EowQFrSJY7?= =?us-ascii?Q?Z7Ai5BWQH/Be7BC2R2K5GuDXvH1U65PjzLnGROypye0NX3RCenaBp28IFagA?= =?us-ascii?Q?h76bFVySc+Ou5kvEy2wha8Uz0gxweSjQ1tkiR7WtK5XJ+qfdYZFYxcT90CVc?= =?us-ascii?Q?yzES4MQ0Q4UNqCqkcUfPVa37x+sa+SjHZIKW/rF5z4467LD4Rmt9u5/QvSLZ?= =?us-ascii?Q?GRkUnAfdazyX5egQrtUQjFHixC8PBVztvoQkB0OCBILy97uWX+lDYifgBPgq?= =?us-ascii?Q?3+K+D8tEWqvysNPspxM8r+ONox1iLfTqZM6XpTxDqwKSOuy7psKjrYl/AzC7?= =?us-ascii?Q?UfRYx/4i9yQr7dHFuFI0j3XLlLZ2CGuGhRDQaguI00u/LABu3GPAnqJj/XOJ?= =?us-ascii?Q?/AFaXtu6KY4ZKDj2WLvFzaQwt+v5y4UHFMjqvwdhB4c36nd8RWcKiksNUGSH?= =?us-ascii?Q?H97xB2hE+Wv5okva96/QYacYzv7JRFTyUu16F/v9zaigXFZIqPsQzbNYhRO4?= =?us-ascii?Q?quuLLEPx+LyLJSLHwfo7iJ7UaEozKbje31Mj34kC1sC21zYSixQjrhkwGrvd?= =?us-ascii?Q?sk5/NDmdpQjjHScH45AljuURYXIt+IxTnuoSwyX+onLcmi6jc5KyF95gVoTh?= =?us-ascii?Q?zuOFJTB17A4tDv4TAKN4QZFgxfoNYmW0YR6TdQ8Ggu9OSLbzItp46mgFePiI?= =?us-ascii?Q?ToQ4Ear6RF5j6d4PSgVmfyvMlbf99r7kP4JiGHeFT4pXsRa2ejxIuRlgigtH?= =?us-ascii?Q?exO226MfhRTEe+2m4WJHRl2hs6NEL4QAhgk2FpvMkCBQW87I50aFsQXpQFJG?= =?us-ascii?Q?A7xf0MYb38WF+wzrJHbbEnlUSWUrYOp58LRunpjjYBH2X82YiB4QmL+bejLb?= =?us-ascii?Q?A2TrzQsLBBhjkyPrSOOGdReKmzdUc0pA2rrPCPKaQnO8l+LM1UE4sms7z86o?= =?us-ascii?Q?mcZw=3D=3D?= X-Forefront-PRVS: 03607C04F0 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6009001)(39840400002)(39450400003)(39850400002)(39400400002)(39410400002)(39860400002)(24454002)(23726003)(6116002)(229853002)(2950100002)(6666003)(6916009)(9686003)(4001350100001)(86362001)(55016002)(54906002)(33656002)(1076002)(50986999)(76176999)(54356999)(47776003)(2906002)(38730400002)(8676002)(53936002)(110136004)(189998001)(33716001)(305945005)(42186005)(25786009)(4326008)(6246003)(50466002)(7736002)(478600001)(83506001)(5660300001)(81166006)(6496005)(18370500001)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:CO1PR15MB1077;H:castle;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CO1PR15MB1077;23:IBmfXUJqKIqacDCfmPISxvr886MlGnQmryBdgwP4l?= =?us-ascii?Q?Bn0i7XQ/8HYmV4Xqdi+nvqnEbdYBi9CBoKos3fyFZGoNW5D99bCCcrRnDIPg?= =?us-ascii?Q?dpVjDnCS9ySYz6Y2rwlj4LrRqiUMevdK4/TTqIfIJo1Y+fI2ehnE/RTeEp6V?= =?us-ascii?Q?JFAZ+0cVLNJMMvV8RFzGSylP6pZPuWVe8tPuZBLU3NfdWNoM/p0NBysXD3sw?= =?us-ascii?Q?m5hB3TCIAjeZWrpy5GrgA5Y59h3YNI9FtFOo1UkBO6EQgdXK5bBNYYTW4xDG?= =?us-ascii?Q?NjkjZOgmyugKnWbnrvkLZ3u8Y672hLJJHJxjR4BAWnJaPSyA4bMmbUL6R5bU?= =?us-ascii?Q?ZxkHVDJk1WSH4kOcIj3PcUA/88twQ0E2F3hfpqjOPUoleHE2K/0OWh53VON7?= =?us-ascii?Q?vcV/SLDd0avsRrm82HZAhwOv/ZfyGQ0Gj142rynTxjIJQXjPeCnG020mYWuY?= =?us-ascii?Q?oPPL3WGpaKN+WtL2PPHQQjuwplGyQ4FrG/kcApFXwPIwhd0pnnuX2K/s5uxa?= =?us-ascii?Q?gJSxdlJCXOY+IujVDuj8cNuEx/ANIsMrcUzr2NhNlsNufRdeOtn8zU3IiZQd?= =?us-ascii?Q?vio02ZmLRSvMpfhfsbxt1DATOpzB2at3jfNq4JS7DyH4Vul8gDpB2vZTbi4o?= =?us-ascii?Q?w+vaUWqSllGmFjJqGaputb3JXWqFZCQOS+wrBawA6Xij8XDcNdDcK9Pq85xb?= =?us-ascii?Q?ZQ+x/BofG0Tky8LwhXUEBnMVdEIzNR/uL5B3Oyb475Rfa+KzVyeLv/zujJL0?= =?us-ascii?Q?wV2oDt0s47Jo++tH6noHM7iNx2p4pLaEgCwgBRF2WgFdLIzDI/Yu15al+j1H?= =?us-ascii?Q?dCKU2b/FQ3PfNB82V4j+xB229FWSwAskJfyIHn4BHN+FT8XGkRtwchNdffbx?= =?us-ascii?Q?pdNw0aJ623yxumx6gW31JmH/zGczzI5kOcEO5/wt6kUJ85X8KhDO9ko1WDiu?= =?us-ascii?Q?Tn1fniE87B6fAFcp5+I5QuEW7CDbPbngopZN7aONSqyvxlMNBPU/Y1aOVFYo?= =?us-ascii?Q?8AMALkBX1Qc4T5tcwTWeRC9Xha0aifkPtKfQBYCDnXJrtqv9v1SNW7eusEn1?= =?us-ascii?Q?uUgOcISxziyYks/lwT5QS62g4yYHZ3G3O7QOvC8M9tQp+8R3UQBeXjGD9h+4?= =?us-ascii?Q?E/etQIIZguxqSTn4elnBAIV+FfP264iGLZobm1yLVNt4CPJtnaX+peJpfpTP?= =?us-ascii?Q?DMfL8T0d8dcIYc=3D?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CO1PR15MB1077;6:GessxJ2GbmIzi7GYeqWkcjIg3PfZPqNteytQueGmPc?= =?us-ascii?Q?pWYoF+DbZ6RpPr0ClDlFEDyEmGH69FLKvlWIumLvCj419H4ML6sWEH0HnOFG?= =?us-ascii?Q?ghBL+MgbU5FOYOCE5dj5+LD4cb/y3cxrt8ySt3VyQSG0J3jniGFbwfWK0H+0?= =?us-ascii?Q?OXKAUiJbbdECNcuK5kdFpIUJsOQoBnVqMDNX12tIyGx9kSia7ET4lhEAeGY2?= =?us-ascii?Q?Fsp+tu7FJwsuR2D0zsu2No/q6gxXrYNzDP4C3hlC2VOcdW6FR/mDnC7ickoQ?= =?us-ascii?Q?9AmVLPooVKCvfQNhQt/6ina/5OF2X8rK/5mcbAEXKh8hg/skY83tfuAALTVT?= =?us-ascii?Q?yPv7500SZwuR/j4gSS+OAwVFZrcfg/II7JYbgeOjYKwZgBGM1emuBAnM6yVh?= =?us-ascii?Q?73yrG1Whwp0V1ih546rzf8hzJjogliwimEQf/PUNgVzGApnCRO3XbIKzI/Xw?= =?us-ascii?Q?BVEvgP/haPgXgzVAv1hzccdnnlPPqubdFmE6cGEB22cKQ2liLcp5VxRwYoZA?= =?us-ascii?Q?+xeY48/J9H1d9wVp/BdB6UUrnR9aJU5hBd0HdAtGgt0fyIJC4XeGJaidgNLm?= =?us-ascii?Q?Q9ACxPRNpqnnXyTK3TxZaYu4UT13tEyO86bwx2FB8dDfwGpaEjbu/TO6m3sw?= =?us-ascii?Q?9UCgRtVMcbRnmRzrukuvRavPif9HC2EbbURzZVHowoZbNw++A8N8ayravRf2?= =?us-ascii?Q?XdsJMotrrEUyB7E15MFmtNj26V18yiV9PH7T+VwLj7YLlePruYS5sbzVODQx?= =?us-ascii?Q?aVfFp84eICtYiloLkVKA3RP2SiOUEsHBNDtCi5ZfL1i+mxQ15KGyddK8n/x9?= =?us-ascii?Q?ixhCFns8orob+RuakAr5iy3Xa1wAjhwQw3J+ltR8LDlKsjnVcdBhc8dLpZ7P?= =?us-ascii?Q?AyvSKiVKy1S06FeinWx9MqavC//X9SCfUz4VREnG8yXegKIiil3CzV5n4+dC?= =?us-ascii?Q?6/rSlXLE09qmZe6JrsUg+rJH2bd/BxhLTpe3yY8EAmxeceT+OdQmn3YS7JlK?= =?us-ascii?Q?c=3D?= X-Microsoft-Exchange-Diagnostics: 1;CO1PR15MB1077;5:Ul7w/UFn22lOA4BlSZMuQAJEkK5h4WbRLKeRZXR0EVWM/6lUE37a/YriYKYUxEw4vDzcXiSn+SE6qp7cxjF1abdq3sn6qIEcEbYZONCE9mCaawIocqCAigCs9oDyAbbcAbrakwo24k4Q0yk/UJVNZ4PcM0eHPK8k+ctEDKq/dh3CVIxXw5AQzqnXi+kX5wAlNdp3D8xv5Do+DQZulkGFXeMCABWUzZmjqOheu9YdYQV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cK29Ztn83dvD1yJk8bkF80jI6if9j1VE9UCR3OO/qKMTtTMHjEcgo7PMOfrnZTKfMZMJdx3CPjO1FDi8SiOgRCdxmBDjx3tM4hcwrfM+aVKAh40svzSDZpiW5Ihkc3sx3MSW9d1SnT2KDaXpOlEVRZYgTk1O/XnapPgM47ieK5e1JiL54xQI0yzonifalcT5TOks= X-Microsoft-Exchange-Diagnostics: 1;CO1PR15MB1077;20:ui/biwDg+UP+O4iXPsQamt+evIZBWJybA1cKeiAaN5cYuDmIBgO2ZVK7hk0kBKWXM9KxPtb5ianReBLYkNDBYGXj1NwLRTSNxDPAedCP401uWLdCFF6DhULMInYfiY7l+w2z7XLlCMce1CTEuI9kx3wwKmeswpmZRzzolbpCWTs= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2017 14:46:53.3935 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR15MB1077 X-OriginatorOrg: fb.com X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-07-06_09:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2872 Lines: 59 On Thu, Jul 06, 2017 at 02:19:41PM +0100, Mel Gorman wrote: > On Thu, Jul 06, 2017 at 02:04:31PM +0100, Roman Gushchin wrote: > > High-order allocations are obviously more costly, and it's very useful > > to know how many of them happens, if there are any issues > > (or suspicions) with memory fragmentation. > > > > This commit changes existing per-zone allocation counters to be > > per-zone per-order. These counters are displayed using a new > > procfs interface (similar to /proc/buddyinfo): > > > > $ cat /proc/allocinfo > > DMA 0 0 0 0 0 \ > > 0 0 0 0 0 0 > > DMA32 3 0 1 0 0 \ > > 0 0 0 0 0 0 > > Normal 4997056 23594 10902 23686 931 \ > > 23 122 786 17 1 0 > > Movable 0 0 0 0 0 \ > > 0 0 0 0 0 0 > > Device 0 0 0 0 0 \ > > 0 0 0 0 0 0 > > > > The existing vmstat interface remains untouched*, and still shows > > the total number of single page allocations, so high-order allocations > > are represented as a corresponding number of order-0 allocations. > > > > $ cat /proc/vmstat | grep alloc > > pgalloc_dma 0 > > pgalloc_dma32 7 > > pgalloc_normal 5461660 > > pgalloc_movable 0 > > pgalloc_device 0 > > > > * I've added device zone for consistency with other zones, > > and to avoid messy exclusion of this zone in the code. > > > > The alloc counter updates are themselves a surprisingly heavy cost to > the allocation path and this makes it worse for a debugging case that is > relatively rare. I'm extremely reluctant for such a patch to be added > given that the tracepoints can be used to assemble such a monitor even > if it means running a userspace daemon to keep track of it. Would such a > solution be suitable? Failing that if this is a severe issue, would it be > possible to at least make this a compile-time or static tracepoint option? > That way, only people that really need it have to take the penalty. I've tried to measure the difference with my patch applied and without any accounting at all (__count_alloc_event() redefined to an empty function), and I wasn't able to find any measurable difference. Can you, please, provide more details, how your scenario looked like, when alloc coutners were costly? As new counters replace an old one, and both are per-cpu counters, I believe, that the difference should be really small. If there is a case, when the difference is meaningful, I'll, of course, make the whole thing a compile-time option. Thank you!