Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932379AbdGSWNb (ORCPT ); Wed, 19 Jul 2017 18:13:31 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:57149 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753467AbdGSWN3 (ORCPT ); Wed, 19 Jul 2017 18:13:29 -0400 Authentication-Results: toxicpanda.com; dkim=none (message not signed) header.d=none;toxicpanda.com; dmarc=none action=none header.from=fb.com; Date: Wed, 19 Jul 2017 18:13:14 -0400 From: Dennis Zhou To: Josef Bacik CC: Tejun Heo , Christoph Lameter , , , , Dennis Zhou Subject: Re: [PATCH 09/10] percpu: replace area map allocator with bitmap allocator Message-ID: <20170719221313.GB92176@dennisz-mbp.dhcp.thefacebook.com> References: <20170716022315.19892-1-dennisz@fb.com> <20170716022315.19892-10-dennisz@fb.com> <20170719191635.GD23135@li70-116.members.linode.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20170719191635.GD23135@li70-116.members.linode.com> User-Agent: Mutt/1.6.1 (2016-04-27) X-Originating-IP: [2620:10d:c091:200::3:503e] X-ClientProxiedBy: BN3PR05CA0009.namprd05.prod.outlook.com (10.174.64.19) To BY2PR15MB0502.namprd15.prod.outlook.com (10.163.110.151) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: eed33207-2b27-4253-c4e2-08d4cef35eff 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:BY2PR15MB0502; X-Microsoft-Exchange-Diagnostics: 1;BY2PR15MB0502;3:BmxvptuhUFhiQAjUH9HWe1waukD+lkuDh6oCgmz5RDx7SHe98L7aYbn2BvItZ0UwXkuHaJra996JiDgyACpPZF88CGw0eqR6M9oO3xnc9agnTpWMSoE1EFAalLgvlEqIUHec63uUst8chWwBchHMGmOvuyJsPueK95R/PvSffG4JztcJIwR0LWDoAwRZNQ4E4B2UsRcLhDkTof8ZCPUG+kJNTmJrlA5qo9cXYvo+nKlajJ7YzR/+qKeb8S7rDBQCAPmGqNcLWQuDcUGPip/H2FrFEu+ZAXHGLBpzCYIdPosM08FG+DwoSvrY2+I85RJeCq8uINehJqbjreDUzKJV151FaUsWVenE6M8dGZsFi3QEIctjcXyReHk5jmPfx4r36oR3wWP1OBMCSZe5v7ZzzidhV0EIXyk/74tUl9ujvvPG1gwadNXSp39VYUs3LAqSD2uJGPDNsJIQZIttvkSmeCWpMP7jX9bQvkVyG57A5kdQMF+/dYHEmd879AwJqRc11SRRiBUXA9hHVM2BMe21E9s33FRxyJYB6Ri2qPNqjPgPEvmafVFKB2ytEwqBGPE9dR7QM1+Y2UfjkPA/7UrJs6smtqWrg8wqUFvqGVBibS16V5DqjNNHoQig+awwP1aD1VisLcmBtqcXYpDUqZPivfUAKnvakUuFOVHQsQeP2n5CB4m5GlBblYTUqeXXVPLYrCVdHXREpyrU8SeAxC3Xd/VdyK8U4KlYAZz2UevfENo= X-MS-TrafficTypeDiagnostic: BY2PR15MB0502: X-Microsoft-Exchange-Diagnostics: 1;BY2PR15MB0502;25:R5384omi9au6w4fHw5KbtJf4MN8IXdcmp82Zl96ELjmspjoObg/dtuitKlaNq9ginNLL0HESW7hBV2SiD5W3DReY+5aRFfuI5fcL1pRRdY6YEh0B6dOjz4IAS/ojMET7FTbFDeA/yF5x45PBYHesu28WW85kGS828VORSJb0sJwyAQqZcNS8Vo0znXO/p07/T1UcVHRk0CtDDbIeBCM4HciXXGwbCuNAHK2hHLl6S0++2AcQ8mRvYpgDoiPAaOXusX9vwYKqDP6arUobjn+KAfOJjGEKx3GJ+2jB1p3Jw49LQBJC/xZERwg822ig8rY8IO/jwSWqN79ntNistrvE1W7oyXedIPxdQpeKqt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W/0wQ5kWxKZfHOQzCw957B32s5MrGwqNeUyotqvsyb4EgKFwGSbMDzNMI3IRFZ5mCdl2O14s+nS4LXoVG0ozvG7iYFzEJWG8cb0HIGSWsawHMjMOeCe3iF3m6z5FYOZUGG24glb8UD1DsvmfhFoLc562A7fsJgMq4j4FA+OJsCa5391J9pAECHXtmt6LVITFciEdxNbAWI0uJNpUFSt7DylEjtwlSVUovAE= X-Microsoft-Exchange-Diagnostics: 1;BY2PR15MB0502;20:IaRrT6nQL1e5zb9uSp1szYqlWtO0DqqqI63ulTzSPGQOo6ZrTMoZznLkBNlUM2a4LVLRLSGH9pEcN4zZmH/l7yzlcEGqXAJ7nJ5j/AjPImi48Sm1YArj6Lv/UJG6FoDFYro+9dqU8hJZ3JVDGwhvVKBFB4G0p20G1HBBLBaQvk5WnPIUh4eI+ocJOteg423FJFwBa7fFvO5XmGDZORKb8yfYWcNDhkgEEe7pvw90UejeNUV13/xi5/g6deOudAs+e6vPlM3Cf/5X7pZUBKczgShnumxqt/uMyN7kGf+TCghFtOL8dy46JsTN9ZwTQMU7LUAPhCodEiV8UWaBedZ4JbM1rz5JGYq+N3xhH3QKga2AZNC+5jlzw2nwrUHFmXyMMETJucmb8ZMSTgPbpJ17QIOYhMKM/Jn8wihGEstk3BFEr67W5+EKOyUCiQCazv2KgEpy2EyjkrctUwT3tqzsf6yq1DTQwAy70j68IVMaj7ZgJglVEHi8SlWhE1Mn2i9d X-Exchange-Antispam-Report-Test: UriScan:(236129657087228)(788757137089); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(2017060910075)(8121501046)(5005006)(100000703101)(100105400095)(3002001)(10201501046)(93006095)(93001095)(6041248)(20161123564025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123562025)(20161123555025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BY2PR15MB0502;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BY2PR15MB0502; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY2PR15MB0502;4:1T6hPdWJ32pt9VN+gunzQkkP/cJMnF4sHG8oXmkRga?= =?us-ascii?Q?hhBvM1wHHvp5dOyGwrZlob0Xkch775wE7SBIRMv3IHGoryHGE5kUg+bRSYMz?= =?us-ascii?Q?/ar1CaUHbLAAYwwkk7ocG44gwiEL4J4dWt4Ppk+hdOKU8Cb6qbpufraYDjDe?= =?us-ascii?Q?eO48Yql/B3EiC48dXNKl5TDvtgzKcU4JKYlO4cxZuH/nP6uAPI80o3mjtxYx?= =?us-ascii?Q?BSGg+CEEKkY0zUGsrWG6wS5M6vHqa2rkNl3+34hS0E8bhkf9iGx0Rw7Z88Sx?= =?us-ascii?Q?Ldw0I03EnyayZS3eVggjKTZfflrTgifVgBJjMJR9XHRe19ATYzR/RvbUj8GF?= =?us-ascii?Q?D8wsa4vMMV2f1zLXhRJr8ORVNulE5X6YfY1ktETKSECBZpkRpkdXQnKjBJgZ?= =?us-ascii?Q?KPKXQ3ENBZNMULCkX03jRMw3MRbI8v+S1znF0Xs+WXfqY7d7V+noU31b9whe?= =?us-ascii?Q?FD4PZvim27b+CxUQrQ1zFV6yENC0yGpvfsLeEYTfRCgUfGwGWgkBLr7dOAyL?= =?us-ascii?Q?I7DsSRUipXH7twoQtKF6UNHqFJzP8j2fQ/2wtkDwYy9l7+awyNdvhEaoSfGH?= =?us-ascii?Q?LH20zaGvJePLPuESHhMcNfcKHLP+oB77+k2PBKcfKlfZSDFrf6FaXHaj4lWJ?= =?us-ascii?Q?us/Dx/Qcs5DnzAuEXiSAZdw2DR9cieHheaE6FDx2HD0kDOUwiMxOsowoQrlI?= =?us-ascii?Q?VJtmuD7R+oRcq7DExJ/Dkgv7OtiU2ngZ7vbMugP/3qGJpFE5qSHsEXIgbGLX?= =?us-ascii?Q?QvD1ywiwmQLTUVC/OV1xTHwiShyVkME/uj8vYKlziOZaGzZQqPA6kG0ic6Wj?= =?us-ascii?Q?ZmnQdW5gVHT71EacY9uxW4iybkN/ui6PB4XmaNrrSMZt6/k6WAFERFgttcW2?= =?us-ascii?Q?IAjHc6tt/C302d1uwUUNNMByT9f2nqTzUUgIUt8tmwKs5tih1/MydYiI+2oj?= =?us-ascii?Q?s+lYzNWygvmPdx72XSkGjfbuyb3nAPHP+oqzMYAxhfIw2YWwi1fRvlJ1EuBS?= =?us-ascii?Q?4YZ1N26pZVnV7FQX0usy3l9a7Jza8Q8UIsltnzPmwH6ngs0iQ79CS35sHj7i?= =?us-ascii?Q?ARJE/unaa7fEncLEkjKHTwDm+J1dasREfOwJK8OfG2I3Y+p+duCUkwdI1Mcr?= =?us-ascii?Q?Gcrp2A8h1Oh3NpkcDrl1mzj6nzTuwOTmEVl0QF+fnKitOCAdZXuUtB/DAhWQ?= =?us-ascii?Q?RAlJ5js5EJv5jCsO+ZH2+QdexXnbcezCDpnbcNMsgh/rEiT1JOKRbz1oEZzh?= =?us-ascii?Q?SptI/gq20zpytU0zQ=3D?= X-Forefront-PRVS: 0373D94D15 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(7370300001)(6009001)(39840400002)(39450400003)(39410400002)(39400400002)(39850400002)(24454002)(7736002)(47776003)(1076002)(8676002)(4326008)(25786009)(54356999)(76176999)(50986999)(305945005)(7350300001)(86362001)(229853002)(6916009)(189998001)(6506006)(6666003)(6246003)(110136004)(81166006)(2950100002)(83506001)(38730400002)(55016002)(478600001)(53936002)(2906002)(9686003)(33656002)(54906002)(23726003)(6116002)(50466002)(42186005)(4001350100001)(5660300001)(18370500001);DIR:OUT;SFP:1102;SCL:1;SRVR:BY2PR15MB0502;H:dennisz-mbp.dhcp.thefacebook.com;FPR:;SPF:None;MLV:sfv;LANG:en; X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qaBYyQJgQgg7Ubv9vBfzaih2mc+HNaRh8eBZ4BwXgZmJECspP90E= X-Microsoft-Exchange-Diagnostics: 1;BY2PR15MB0502;20:H0yRxLvw0MFMYjkK4Scq8Jtjdp4Q1CaVBDhk3hWqZ7xKHp0+kBFbd5uLIATug9Irmw4Oa1lTWkVhJnhJxUCHXH4J5H81SHPlsxiG0CaUmhlKa1Geg0Cg9cgzL2t1n5HFdxAVuMD9mlSLfKokdvkJ93yMePHMWmhBSGgI2SzmkRA= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jul 2017 22:13:22.2459 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR15MB0502 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-19_15:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1488 Lines: 33 Hi Josef, Thanks for taking a look at my code. On Wed, Jul 19, 2017 at 07:16:35PM +0000, Josef Bacik wrote: > > Actually I decided I do want to complain about this. Have you considered making > chunks statically sized, like slab does? We could avoid this whole bound_map > thing completely and save quite a few cycles trying to figure out how big our > allocation was. Thanks, I did consider something along the lines of a slab allocator, but ultimately utilization and fragmentation were why I decided against it. Percpu memory is handled by giving each cpu its own copy of the object to use. This means cpus can avoid cache coherence when accessing and manipulating the object. To do this, the percpu allocator creates chunks to serve each allocation out of. Because each cpu has its own copy, there is a high cost for having each chunk lying around (and this memory in general). With slab allocation, it takes liberty in caching often used sizes and accepting internal fragmentation for performance. Unfortunately, the percpu memory allocator does not necessarily know what is going to get allocated. It would need to keep many slabs around to serve each allocation which can be quite expensive. In the worst-case, long living percpu allocations can keep entire slabs alive as there is no way to perform consolidation once addresses are given out. Additionally, any internal fragmentation caused by ill-fit objects is amplified by the number of possible cpus. Thanks, Dennis