From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20A0EC433EF for ; Fri, 17 Jun 2022 14:19:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9414A6B0078; Fri, 17 Jun 2022 10:19:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8FB5F6B007B; Fri, 17 Jun 2022 10:19:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7B7FF6B007D; Fri, 17 Jun 2022 10:19:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 696EE6B0078 for ; Fri, 17 Jun 2022 10:19:51 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id 4149212159C for ; Fri, 17 Jun 2022 14:19:51 +0000 (UTC) X-FDA: 79587936582.21.BD9C118 Received: from gentwo.de (gentwo.de [161.97.139.209]) by imf08.hostedemail.com (Postfix) with ESMTP id 3E3C2160090 for ; Fri, 17 Jun 2022 14:19:50 +0000 (UTC) Received: by gentwo.de (Postfix, from userid 1001) id DA0A8B0022B; Fri, 17 Jun 2022 16:19:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gentwo.de; s=default; t=1655475587; bh=8Ft/GfnSZAGB8iS96jW7jEYAJzsfaccke4alN1b5XdI=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=Xuyu1U5rbjZHVjd8r4wDEFGdPrBHXa7b+gPMz+AIKyQWDWqv/fqBIOx0WPnDvbOiE /YAbib1CF8oQJN7kdtpUoGmF5raDoxruPWgNdY9hvAt0nBe6sAq6f0k7wKiW2frPCA cqa2KvGwZb+/MBdxSpSyF29yIMy5EFWVHbG4aP0wlO17pN5F2vbF6WO6tmQcqvX2IR aEJ9VSC4lKue0G212H/2B28q07H2YSiD9o1h3DY6fGZcgok9zAC7AQ6DqyUXkreX6J sAgf4NBjv2cW8mtaE1VHhe4yOxmB1V4TCEaiqMcmSqy6CRf9ydHcenf406GWxCpExL et8MRrY9AG9Cw== Received: from localhost (localhost [127.0.0.1]) by gentwo.de (Postfix) with ESMTP id D7739B0007F; Fri, 17 Jun 2022 16:19:47 +0200 (CEST) Date: Fri, 17 Jun 2022 16:19:47 +0200 (CEST) From: Christoph Lameter To: Rongwei Wang cc: David Rientjes , songmuchun@bytedance.com, Hyeonggon Yoo <42.hyeyoo@gmail.com>, akpm@linux-foundation.org, vbabka@suse.cz, roman.gushchin@linux.dev, iamjoonsoo.kim@lge.com, penberg@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] mm/slub: fix the race between validate_slab and slab_free In-Reply-To: <5085437c-adc9-b6a3-dbd8-91dc0856cf19@linux.alibaba.com> Message-ID: References: <20220529081535.69275-1-rongwei.wang@linux.alibaba.com> <9794df4f-3ffe-4e99-0810-a1346b139ce8@linux.alibaba.com> <29723aaa-5e28-51d3-7f87-9edf0f7b9c33@linux.alibaba.com> <02298c0e-3293-9deb-f1ed-6d8862f7c349@linux.alibaba.com> <5085437c-adc9-b6a3-dbd8-91dc0856cf19@linux.alibaba.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655475590; a=rsa-sha256; cv=none; b=MWeivDEtTSfr0DbYC1GoNCjJoY8kBKraZV6I1DaF2azZF+Gq+FnFN+poC7cKdB/ssy2w6D Tig3p0CsC70pQPDb+12I4NC1KGX4qca3rOc0AKr4xF3AeyZa0Anv7ZRD1eEb/BL+KbHKxP UUS/qMqtuwD+iSr34jhhEWtXsKcIARY= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=gentwo.de header.s=default header.b=Xuyu1U5r; spf=pass (imf08.hostedemail.com: domain of cl@gentwo.de designates 161.97.139.209 as permitted sender) smtp.mailfrom=cl@gentwo.de; dmarc=pass (policy=none) header.from=gentwo.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1655475590; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=V+XLEDhVLJYe/kuLOTRj0FQV4thISW2671OwGwO8/9A=; b=YrtBI8jGP+DjY6T+IlGi83So8RpI2YEbom31Kq1rUZXfRM1hIH92t4CQvZ8Mdrt+2+JuSL SkE8nEaPH9UUfHxYXeGemzHiWUr+mxkj1DUpYhkNzyru4/IkDH9SMBGejyR4ZidCi9Zqxk T5PxJonYZVy2nUMkFpHf/TiZZ4Eeejo= X-Stat-Signature: f4yd8ws6xif73bcym1ca63x94ko7ri6x X-Rspamd-Queue-Id: 3E3C2160090 Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=gentwo.de header.s=default header.b=Xuyu1U5r; spf=pass (imf08.hostedemail.com: domain of cl@gentwo.de designates 161.97.139.209 as permitted sender) smtp.mailfrom=cl@gentwo.de; dmarc=pass (policy=none) header.from=gentwo.de X-Rspamd-Server: rspam07 X-Rspam-User: X-HE-Tag: 1655475590-748659 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, 17 Jun 2022, Rongwei Wang wrote: > Christoph, I refer [1] to test some data below. The slub_test case is same to > your provided. And here you the result of its test (the baseline is the data > of upstream kernel, and fix is results of patched kernel). Ah good. > Single thread testing > > 1. Kmalloc: Repeatedly allocate then free test > > before (baseline) fix > kmalloc kfree kmalloc kfree > 10000 times 8 7 cycles 8 cycles 5 cycles 7 cycles > 10000 times 16 4 cycles 8 cycles 3 cycles 6 cycles > 10000 times 32 4 cycles 8 cycles 3 cycles 6 cycles Well the cycle reduction is strange. Tests are not done in the same environment? Maybe good to not use NUMA or bind to the same cpu > 10000 times 64 3 cycles 8 cycles 3 cycles 6 cycles > 10000 times 128 3 cycles 8 cycles 3 cycles 6 cycles > 10000 times 256 12 cycles 8 cycles 11 cycles 7 cycles > 10000 times 512 27 cycles 10 cycles 23 cycles 11 cycles > 10000 times 1024 18 cycles 9 cycles 20 cycles 10 cycles > 10000 times 2048 54 cycles 12 cycles 54 cycles 12 cycles > 10000 times 4096 105 cycles 20 cycles 105 cycles 25 cycles > 10000 times 8192 210 cycles 35 cycles 212 cycles 39 cycles > 10000 times 16384 133 cycles 45 cycles 119 cycles 46 cycles Seems to be different environments. > According to the above data, It seems that no significant performance > degradation in patched kernel. Plus, in concurrent allocs test, likes Kmalloc > N*alloc N*free(1024), the data of 'fix' column is better than baseline (it > looks less is better, if I am wrong, please let me know). And if you have > other suggestions, I can try to test more data. Well can you explain the cycle reduction?