Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752313AbdGFQol (ORCPT ); Thu, 6 Jul 2017 12:44:41 -0400 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:60035 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751751AbdGFQoi (ORCPT ); Thu, 6 Jul 2017 12:44:38 -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 17:43:04 +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: <20170706164304.GA23662@castle> References: <1499346271-15653-1-git-send-email-guro@fb.com> <20170706131941.omod4zl4cyuscmjo@techsingularity.net> <20170706144634.GB14840@castle> <20170706154704.owxsnyizel6bcgku@techsingularity.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20170706154704.owxsnyizel6bcgku@techsingularity.net> User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [2620:10d:c092:200::1:90f3] X-ClientProxiedBy: DB6PR07CA0125.eurprd07.prod.outlook.com (10.170.219.18) To SN2PR15MB1086.namprd15.prod.outlook.com (10.169.192.136) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cec9cfbd-c04b-42a5-c44c-08d4c48e1ac1 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:SN2PR15MB1086; X-Microsoft-Exchange-Diagnostics: 1;SN2PR15MB1086;3:2/uZFt9IaTxEcdYrku7e5UZ1ficv6549FcbXLfsRb0L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VclXHGAXDQhyz2FKVeLTjRGbc/hZ5zFzrz47FCvTcDSo9cqqh6TcC9GbfVvcQIXfvsbAzBvJ9jejS1uQFsk3D+fj/rMYPGOHPWzrOvI40ZHtDu2er6d/fgplTA08ZBwxA+0899KN+ouhl+duAso5npHnGx+CDwbhKROgmJcE2i2R9HSNRYaz2Rny9jcNZsiBECB806hZHrteHvtAQPutJsHaAhoRcU11Sfvqk4fOfKNhFtz9qlMEBzt+NbF35r+mMfDMRIaiXm8ISggkE/lmh+yntEHZ9c5bluU9d0= X-Microsoft-Exchange-Diagnostics: 1;SN2PR15MB1086;20:l9d01+svkShjc6oJNdIFNAE4Wi+INZQBJB4tHutVNcjtwXVtc6/C2lyISwsR/zml6XE9nYGTMJBX4gn6ap11MTfgFES0JfLIZuu/uAICJ0XDj8PWgEbnyz1LXDeLuRmm136+ey+Qu7MMmx+7RZjUp9YzQ6j2Q4vAr2pT4RAFWNtRKvRAXVYWpoFvJOdKyuPE4bulFh1f1EAijTy505Qcspmxo02N7BIyJxr62o/Ex0FnG+QIYru32gjdPU2sC6Dh84rYgnU6rpFCbsWEXkOwikZzAPHtmOhJqI1M32wPO5YMtRNlyHoqKZ9CvvuGS+QlI5zx5HlYWnKH96oEQXI37/ao0MLccw1YI2KdaiG0WmVjXs+ok9uLXNMp+TRLzZJrSNol927IiyALmZr2aAaTfOPL5GEdY82hOShvLyIJGxRRQhH9bNAyo8aKeYRjE1lYq8LefMH/leFFqlNCZWlZc18jQFVGtg/ZnuBc/0wtOFT3oiCMAxYpN04bf0evmIXf X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236129657087228)(788757137089)(48057245064654)(148574349560750)(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)(10201501046)(93006095)(93001095)(6041248)(20161123564025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123562025)(20161123560025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:SN2PR15MB1086;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:SN2PR15MB1086; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;SN2PR15MB1086;4:N5EecS26idY2QaUk2uYf5iA9Po/wlvuUGuhtRdFYM5?= =?us-ascii?Q?sXP4BwpOh9QisUyH63DPy1fhDZPqXOkzMmUiPAub7q3MC4EJE02t7AnriJQF?= =?us-ascii?Q?HOxk9ipZdtWmvUyArpvx0GITTEfUryZQ+g/kj7s3fZX+rBJWMLoUD4dYmWmw?= =?us-ascii?Q?PQQlcD+rgARd86K68FUYbdHjcmwT1ojDp9gia0vpqqkasYkzPJbs6ZAITfZB?= =?us-ascii?Q?qCV6H3XYzywjjZ6CKFJ1qex2vEzhv9ieYsJbH6Qr2gP4CNuOvNW5hgkJ9y1i?= =?us-ascii?Q?SpIOhfg0bIzSTtygGcNCSGNyqMwy8r0VytZxIeP7oE1UnmQ50+nrW1MBw8lP?= =?us-ascii?Q?YuipD8UqA8dfGYDZTsr1gDzZJxCitL0RuGsMjOOT61gJbDhT1pJ0sq7fy8oE?= =?us-ascii?Q?re5qpGnrEDgEitwscYKD8Bgc2DT4iIbw/JmA/2w8cctFP5Ivvl+5gEcJ7HOS?= =?us-ascii?Q?YOYo82oRtiBN3YEQak2i/M87gtJYKakvvK8Rubm1z+KIw5HkgJvgRU1M9NN2?= =?us-ascii?Q?piPjpKZGMk5mConR2/+5R8B1e9n1ZkDDhXV7aSPy/r8jI5SyAJLN3ousb9Un?= =?us-ascii?Q?AhGS31Q0rIVXjAxjLvW+xhteG78LzMxLpBYRNfRqGqYSXgxQjrw/DDTuhgbR?= =?us-ascii?Q?mzEFMZ3PlyUlJpsy4kBSsOgj6NJImwgrAWEtps1toLMKxuPZuURudcIFtUFo?= =?us-ascii?Q?NCwXI2bs3Lx1eHhZWDTOH/J31q95tXD9c3PLpXaeb86jml+o8BLNV8rfrfT9?= =?us-ascii?Q?xCqpDr1P1OP5XtvsR2uLddymOHPcwQrn8bEKh7CO2a0j36Xb12PSa/Cqp67e?= =?us-ascii?Q?dsQJN9Wuboxdly26LOQG3dptBNRSYIDEeCd5L9CDvFGSjZUbqojRCXDhwYZU?= =?us-ascii?Q?BwLarL7MFg8bU00FIpKukHJuViCqNVFHMjbSiKHu/I1vOidoxu6Aqk95NCjq?= =?us-ascii?Q?RJR9cnqXv758511XkjsXEJC6KoU0jfIP7OcP6TrtrpLEWE/yPbhyOT69Z5e4?= =?us-ascii?Q?rglNQJNzmngYB4gqmppIAX6dMabn04R5jSXgv/S7kAHMPA0BP9XJzyI32ITa?= =?us-ascii?Q?giPdLUTKuuzuxmHFfg+imBubd1w6TlLj6KdRsubm5zts7LMOJEKPRcmon/TH?= =?us-ascii?Q?VkpgNcYmJY/gTkS5gSIjb95RwNtOSEZKv3fH/u/QeVjkz2m0LaRD5HkTBKHg?= =?us-ascii?Q?HTU/Z3WqqvO68XitDZRYiWsIdqZv3nSiyLyFzaOGSSS+MypguDNtFeqqTuGZ?= =?us-ascii?Q?0jtWCSa6tsRbS+qEW2JYBiLNmCT4REqTImpgI/lf5I8Zkt9tE3g2VtRLmUoh?= =?us-ascii?Q?WaerZSTyj6FwDdkPJ5/61y530XR+IqQ0pW2/HGSfyW?= X-Forefront-PRVS: 03607C04F0 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6009001)(39410400002)(39400400002)(39850400002)(39450400003)(39840400002)(24454002)(8676002)(42186005)(5660300001)(50466002)(81166006)(2906002)(54356999)(50986999)(7736002)(305945005)(86362001)(189998001)(6916009)(54906002)(6666003)(33716001)(4001350100001)(229853002)(4326008)(47776003)(76176999)(9686003)(55016002)(2950100002)(53936002)(93886004)(33656002)(38730400002)(110136004)(6496005)(6246003)(6116002)(478600001)(1076002)(23726003)(25786009)(83506001)(18370500001)(42262002);DIR:OUT;SFP:1102;SCL:1;SRVR:SN2PR15MB1086;H:castle;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;SN2PR15MB1086;23:5azhD6j40kei9Z3GLLD1FbH+IoB/mADOIz0pmGPVF?= =?us-ascii?Q?iPCjgfaF3jYHcDmQn6qEazLumZlZsav2dt/p1tHE17gJwKxIRXaHLkBYsA26?= =?us-ascii?Q?lJ59RC8ftwPONHWbUQkVchqgn5vn5eitgWsjbR+N26+8YTjUJs5iTErMrc06?= =?us-ascii?Q?HH+ZdNcZl2/x1xV1VtYSqsjadL6xKtkIs7DBR2Dy+N5jyPoUIk0EbFR6TYdj?= =?us-ascii?Q?FxM9SyOVzaWEmOetMNhLjr/chjMkJyTy/fjPKrsm8+ciABYp/ZqvW+yBxb15?= =?us-ascii?Q?Gr5QpzdADy9tFj23/enkxo1hFvgSiajIHo0hcgoGkuINPqxy+Si3y2VQ2pST?= =?us-ascii?Q?xKOgNg5VGgBiNa1lwGsI05u/vHR0cKS/qnC75wl5q5DY/zfcMGOWMb72uh0X?= =?us-ascii?Q?XvumwZmxEFLwdYERpnnHm00rDFimT/MO4YZj439CJeWA9nwUAS97ID7SWt6n?= =?us-ascii?Q?CIycffpH1teoFjx1HBQsNmu5QaVRnSpdwihmPg6JEAOw2Uze56EAOElxaRJs?= =?us-ascii?Q?mnaSzZHQ6AssPYkbuqTF08fLDLvd5Fk/N321TXBVA7GTr5NaBwvvku1d4E6d?= =?us-ascii?Q?yU+bydxnPrR8qlMvOjBZLo2aFliJkmEUmErczksnELytLhxu/+siXhGx+DYh?= =?us-ascii?Q?sx0KWxXeYJhhs4meQlaFoBAYFMiHcIF/OaSeFjg55GdF1KKyytY/nWsb3lZA?= =?us-ascii?Q?im7yJwG+5+Z1px5Gj8FD3pZxU3XJ759fDjqb66HAhEU7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ryYzj5k9seJFQPzVdh+HoRSTob7It8oR6VnmrFWAGx6K34VD3rsrGGRzc2t6CyQm0w/VtA1ClK4dZNqtkS4Q97fPLInDZ4B0b92Cbu8CUwgb+bmsBXLsf6uZKFj9/0xFihkYSNPrzlrKyEOVve4A264CaFGmsHLC2HfycBSvp0VD+pjlXk/uFU= X-Microsoft-Exchange-Diagnostics: 1;SN2PR15MB1086;20:DPigCeSWzvnUq0pcD07Z1dom1FhZYhKa1Ivlz82Msy3nxR+Fj96In5K6CqYD/Ugk5vKRr7zVJ9EH7xTL5HvgGJZVLUdW1/ydiSxctrO4cdc7XAgerrN/X+n5WqmZLrYnavBTKibL11JnwqbRqVBPnKcTB3BPWnb+DoVW1DHTsXY= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2017 16:43:16.3919 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR15MB1086 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_10:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3456 Lines: 65 On Thu, Jul 06, 2017 at 04:47:05PM +0100, Mel Gorman wrote: > On Thu, Jul 06, 2017 at 03:46:34PM +0100, Roman Gushchin wrote: > > > 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? > > > > At the time I used a page allocator microbenchmark from mmtests to call > the allocator directly without zeroing pages. Triggering allocations from > userspace generally mask the overhead by the zeroing costs. It's just a few > cycles but given the budget for the page allocator in some circumstances > is tiny, it was noticable. perf was used to examine the cost. I'll try to measure the difference with mmtests. I agree, that it's not a feature that worth significant performance penalty, but if it's small even in a special benchmark, I'd say, it's acceptable. > > As new counters replace an old one, and both are per-cpu counters, I believe, > > that the difference should be really small. > > > > Minimally you add a new branch and a small number of computations. It's > small but it's there. The cache footprint of the counters is also increased. > That is hard to take given that it's overhead for everybody on the off-chance > it can debug something. > > It's not a strong objection and I won't nak it on this basis but given > that the same information can be easily obtained using tracepoints > (optionally lower overhead with systemtap), the information is rarely > going to be useful (no latency information for example) and there is an > increased maintenance cost then it does not seem to be that useful. Tracepoints are good for investigations on one machine, not so convenient if we are talking about gathering stats from the fleet with production load. Unfortunately, some memory fragmentation issues are hard to reproduce on a single dev machine. > Maybe it would be slightly more convincing if there was an example of > real problems in the field that can be debugged with this. For high-order > allocations, I previously found that it was the latency that was of the > most concern and not the absolute count that happened since the system > started. We met an issue with compaction consuming too much CPU under some specific conditions, and one of the suspicions was a significant number of high-order allocations, requested by some third-party device drivers. Knowing the number of allocations is especially helpful for comparing different kernel versions in a such case, as it's hard to distinguish changes in mm, changes in these drivers or just workload/environment changes, leaded to an increased or decreased fragmentation. Roman