Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965503AbcDLSPe (ORCPT ); Tue, 12 Apr 2016 14:15:34 -0400 Received: from mail-bn1bn0108.outbound.protection.outlook.com ([157.56.110.108]:46108 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756171AbcDLSPb (ORCPT ); Tue, 12 Apr 2016 14:15:31 -0400 Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=hpe.com; Message-ID: <570D3B3A.8080204@hpe.com> Date: Tue, 12 Apr 2016 14:15:22 -0400 From: Waiman Long User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130109 Thunderbird/10.0.12 MIME-Version: 1.0 To: Tejun Heo CC: "Theodore Ts'o" , Andreas Dilger , Christoph Lameter , , , Scott J Norton , Douglas Hatch , Toshimitsu Kani Subject: Re: [PATCH v2 2/4] percpu_stats: Enable 64-bit counts in 32-bit architectures References: <1460132182-11690-1-git-send-email-Waiman.Long@hpe.com> <1460132182-11690-3-git-send-email-Waiman.Long@hpe.com> <20160408164747.GM24661@htj.duckdns.org> <5707EB44.9020703@hpe.com> <20160408174628.GN24661@htj.duckdns.org> <5707FC52.3070707@hpe.com> <20160411221700.GP24661@htj.duckdns.org> In-Reply-To: <20160411221700.GP24661@htj.duckdns.org> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [72.71.243.229] X-ClientProxiedBy: SN2PR80CA034.lamprd80.prod.outlook.com (10.141.39.172) To AT5PR84MB0306.NAMPRD84.PROD.OUTLOOK.COM (10.162.138.28) X-MS-Office365-Filtering-Correlation-Id: 4ef991a1-1c78-45a8-85c7-08d362fe6d4a X-Microsoft-Exchange-Diagnostics: 1;AT5PR84MB0306;2:j4nSt9k4FHCAs48tFKryNA1zFs8seRM5vgw9fX/00MOhOa2ETMAahMRpHCkA8kf9lKjNeaa6bZHBlVSP0HedTdr1fC4O4ayhAdEo5sUHwVefpvwus2y3fGP9pvs4DOP2jJCWLyeWd6a4FIWQbJNXj9Mgx0a0HcqlP8y5gl7vyx9cbMEsyvernjxDmreXFQL+;3:lUOkyBx5XgtcY5UsJaWcjnLtom9ndoLZJwcIpfI3INNhIzxImJCKM35KPI/50GRoUTGadqgLBuKz26iHauz/myT3gah5ZS9lbMOlAsZvpjs4GLBK4zEISGVwpDa9pu5u X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AT5PR84MB0306; X-Microsoft-Exchange-Diagnostics: 1;AT5PR84MB0306;25:ruOFRZ+J2wbO/Ijb7w4oUOFld6P1wxsfCtocpP8RDaKjHLUwVygh/+/M1ynhaeorZxh9XqlCt6m+JiRRDS67q+FKCZ7BDh46KBnV7oXF9KVPOTgL3/j0kGut0QPCCbFpU4Cuskrl3s2Wkgt4l6Mq0l7He22kiiEKcAGWUVxJu+bIGOivRN+csgmat87dimpnonRGXQxhx3lo01BAM3yVGneCltJjONh2QpfevK+VhbWOri1nsxvozeF5/iTTqdNWT56usqJs/uRyK/d3Ctpbru21XIZSu3ey9OFOUtIgwImf/ya8rXfL5spqC0TGQuEvltk1MHDsxI4pxJv6eoeNzNkiilO05oMxbVw+gWs2SRTAFMuAT/atOzloQhpzxYsh5cPDHkUCp/ZnHxFjdhG+iqrhbzb8DZ/53YnKAkbSQI6lRGB9Z+OTLGqJTmR2119eK4fLBex72Rhflbv1QweptLq98zbXB7xoNM8ZnUbocRpe2aiIw2DJGV6375tbv81oQAWUAA3OwpuuW9ERT0d1WDaJmxZ7N1fFrSgHMNI/bW8ZeDdZ+niN9l573X/p2mAhjZPRSEtfTtsXYBcuCCVFrNt3eNkLTO+rxhzPBEqJl+dlLULV3l/glzWrHzC1xd0CVpCdNkkwrifUf7NcUcdQCQ== X-LD-Processed: 105b2061-b669-4b31-92ac-24d304d195dc,ExtAddr X-Microsoft-Exchange-Diagnostics: 1;AT5PR84MB0306;20:SbTi4NjPg2u6PqVlOnNAL/pFj8/uXkR/pkgdf3knEeLdMZkcx0jw6Ac1EO3/gYCFdbqD2QJvnukrM5KS9oAFoyXmdHjMPmJ6VYbBEGC7PJ3K7VKojIKXzb3npMMQtQKDRcWcTXbfoCqfXpxLQfSmV/8WSmplsUXELpMYI9tlobp7YJpOsPL44Ml+L/0z1pTNbBej9bU5qbhx+R4OcArm8ffPOsTP15JcZF+zw4SnGgml4n6GB3RYZND2yANFCH8b1uc6qn5UUrFXznWTq2ZPE7Dn8KjswqZStNpT1+N3M7z7ffNocIeoyfBoPilS8zODTPk3clxkBm+WQinZsvTIKw==;4:lpQlUv9sEXPeXQ4TRsHMGvFBSEOgYVrO8nCctqtvWysOETbpgGP7aqhbvcNsqKs69EeATbLWdKPIH/2xA2WLScvwzt5lEwvPo8G+rfWyJYRQaq+vX2K+DcXAsbVdn8Q2hZwuZjUM/9O8lXy7kpkRTpNOMuuVT9Vw89XrVRuui+xximWAlib8Ch3J0CdR+u7BPIy1967Nwfmu7W4DXs8UDHMFZd4cDYwwNNIoYZM/qfVgH63uB/zMm0BhKVBklFIALJZ2bt6R4Lq0dfRHVu38bSh6BYxC9cjCdZQyuUx7xjFuVbKTxc8ITBl0tOwAxf1CmjP+7aJnAV3eqEjyo8aL6QP0xXmZD0W1GLRJiTVn6K/i6EcScEphzmO+ZlhC7QusoauvqDgVebHUGkNIM81K+w== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026);SRVR:AT5PR84MB0306;BCL:0;PCL:0;RULEID:;SRVR:AT5PR84MB0306; X-Forefront-PRVS: 0910AAF391 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6049001)(6009001)(24454002)(69224002)(377454003)(33656002)(64126003)(92566002)(2906002)(65816999)(2950100001)(5004730100002)(77096005)(117156001)(42186005)(4326007)(23756003)(110136002)(586003)(36756003)(50466002)(93886004)(76176999)(54356999)(65956001)(80316001)(65806001)(47776003)(86362001)(6116002)(3846002)(66066001)(1096002)(230700001)(50986999)(87266999)(81166005)(83506001)(5008740100001)(189998001);DIR:OUT;SFP:1102;SCL:1;SRVR:AT5PR84MB0306;H:[192.168.142.155];FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?iso-8859-1?Q?1;AT5PR84MB0306;23:0B/v805TvnaOFbmeVsWPIJD12R42iecrjA5lI29?= =?iso-8859-1?Q?IlHWzy4BvAaeW3M2HY2jYEhnHY1ZYBBUdUcdU2llEVPlC/9CAU+izLzBwZ?= =?iso-8859-1?Q?61tS2s97MZKyMQWgoXD+3/FFK7cyQjy+MBQX9pf352eGp/eA10tezMvaLk?= =?iso-8859-1?Q?OZvx88cOHhN/TlEWDrddOf1qbGDjQ+hk3gi4KLzWzn/vgYlRZ8pfzXMluW?= =?iso-8859-1?Q?E8IaFS/tCioiCbCb8z1iG97a+8CL3+86x1Nk/JpALOV1wY2K6i4j7LGEKe?= =?iso-8859-1?Q?/i+08JHAbqs8BKiENFZqHPij8iByrW2vXkiHYjBlVHY7GAVfqW4JJG804r?= =?iso-8859-1?Q?cM0I66zKf7O2C8odKwQsVRbCO03sQSNjQDm6Knt0mzfWn1BjeFuJZK5ncB?= =?iso-8859-1?Q?Jps4W+HNcm6980L6gs8cItUHvJG2K7kGTrTjNgA0dzG2+xn/aZWxga0qcC?= =?iso-8859-1?Q?P2LyHAmDU2bS83/wz/Xf9hLbviKJxzwYtnuv2bL3waOdZiyWLyyfxNrTiK?= =?iso-8859-1?Q?1ZuN67iQbtBoVXiv0WuIdAKO6LTTFlXVckw25KLqWIbwNDKabP3OmcMG3M?= =?iso-8859-1?Q?3vAh8yYnLczzF+LE6CKMWg8wXs+byfY8f9a5M7LxsZqn+2fc/qiBkqKhFE?= =?iso-8859-1?Q?tPfPxsCPWaX7aXC8KGGsX+TVSMHRUBJTVnvoBpZptIFRCQ/haoZdJO3Etd?= =?iso-8859-1?Q?HDtl9/nyhQQ7mPGrbl+PGrqFitmOntcFT9HsnbFB4NgRgJ3ZDLAFfxMM3W?= =?iso-8859-1?Q?NBHHDaLzzvcNss9nFo1bdAeskgZQrzn078TgienL5gFmpC5gyU6XEPs84m?= =?iso-8859-1?Q?ljI89ObMt30hiXlhteHnlFOekqKEgKWMt0UfKeGIS9hsU6Lqosps/RNl1D?= =?iso-8859-1?Q?5MgFkXaNfqlrM2wyAEXxFjDvUletnSj7jsbrNrQHCwE+1EU6VqR61ngEur?= =?iso-8859-1?Q?PpGPVwAaaDD+U8u+Z1WW2vBK/ds1fPoWlowpoJnkHOBUSHV77a2u2Bc6SO?= =?iso-8859-1?Q?etLsySOa9Uz+pCfkrCBU6M19M6D1Wf+Qx0QKUiVs5ZBmBRwcNlQz+3+aNp?= =?iso-8859-1?Q?fCFG1deKYFMJaaduIs7pXCqzAMMOUZtJXYWg137P8E=3D?= X-Microsoft-Exchange-Diagnostics: 1;AT5PR84MB0306;5:6swv3o3qPvX3StvgqTpZOmsAhXBYXtR3VWGYEigP2YZsKWdqW7CTxbZ0a76pUXhF2NTgoADjlor6oT1uMY9gCgzSUcTFlo1gTuv2rebRVnEuqJKHwBWQFJX+DWe13+zWhVxFKpXYfWjGqg/J+JZ/Yw==;24:9jx6eDWLZLtxFpK/OeiVHCfjGbSFVdr87uui7I6n9OHcYB7QEwqbeiLNmuKyuYTmJOV+HXM0gxklcHqH3qnI0AaP3Jq7T1HL02fJn6fqvZE= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: hpe.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2016 18:15:27.4656 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: AT5PR84MB0306 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1028 Lines: 25 On 04/11/2016 06:17 PM, Tejun Heo wrote: > Hello, Waiman. > > On Fri, Apr 08, 2016 at 02:45:38PM -0400, Waiman Long wrote: >> The percpu_stats construct allows minimal overhead in maintaining statistics >> counts. The percpu_counter construct, on the other hand, has a higher >> performance overhead and a bit more complex to set up and tear down when > If you're referring to the preemption on/off, as I wrote before, we'll > probably be able to improve that with this_cpu_add_return so that the > only extra overhead is an easily predictable branch which is extremely > cheap. It's better to improve common constructs anyway. > >> more than one statistics counts are needed. In fact, my first draft of the > And yeah, it can be cumbersome to set up and tear down multiple > percpu_counters. If there are enough consumers, we can extend > percpu_counter to handle multiple counters, right? > > Thanks. > I have updated my patch to use percpu_counter instead. Thanks for all the comments and review so far. Cheers, Longman