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 5CD03C433EF for ; Sat, 18 Jun 2022 02:34:03 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4FB1C6B0071; Fri, 17 Jun 2022 22:34:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4AAF96B0072; Fri, 17 Jun 2022 22:34:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3725F6B0073; Fri, 17 Jun 2022 22:34:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 241796B0071 for ; Fri, 17 Jun 2022 22:34:02 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id EBFDD120A9B for ; Sat, 18 Jun 2022 02:34:01 +0000 (UTC) X-FDA: 79589786682.29.5FB68D6 Received: from out30-133.freemail.mail.aliyun.com (out30-133.freemail.mail.aliyun.com [115.124.30.133]) by imf01.hostedemail.com (Postfix) with ESMTP id 7EA7A40006 for ; Sat, 18 Jun 2022 02:33:59 +0000 (UTC) X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R181e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046060;MF=rongwei.wang@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0VGhbwTR_1655519632; Received: from 192.168.31.179(mailfrom:rongwei.wang@linux.alibaba.com fp:SMTPD_---0VGhbwTR_1655519632) by smtp.aliyun-inc.com; Sat, 18 Jun 2022 10:33:54 +0800 Message-ID: <1b434d4c-2a19-9ac1-b2b9-b767b642ec0c@linux.alibaba.com> Date: Sat, 18 Jun 2022 10:33:51 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.0 Subject: Re: [PATCH 1/3] mm/slub: fix the race between validate_slab and slab_free Content-Language: en-US To: Christoph Lameter 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 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> From: Rongwei Wang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1655519641; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0mGJbeZt5iEuAT2hvxVQ7Z/zdoLesPsk66g4yqHS5Fg=; b=tI+tJYJ/DWlAla7d9tQEBOskcgnZEl3ZByo+plOE6iCuTLlfBB+ITIpRxbTSsGnAnGWzGN NYRdCLicsgjgN73L8Apnw7mZC/K2MLkCrDv9MTtjWQCgVjg66kJstfif1azkenmmd1sxu7 ueY/vZhQJc2KRhYVim9lfE+6idMiXvc= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=none; spf=pass (imf01.hostedemail.com: domain of rongwei.wang@linux.alibaba.com designates 115.124.30.133 as permitted sender) smtp.mailfrom=rongwei.wang@linux.alibaba.com; dmarc=pass (policy=none) header.from=alibaba.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655519641; a=rsa-sha256; cv=none; b=GX/ZTPD75bGFiNsIO8qwUcEAPF9DH8HUBFczeBIDFO6quUf3kWxrazEbiKpI4lrZ4u3a6/ uFGSQXQoK53aYeM/LBE/pLMFMKzef1g3ZAvCwE7oufhVxyQbRAXMjE81qvrKyXwk2OguNH NcbfJUFrS6C9tMHLHBnNKuvkTtVTUwQ= X-Stat-Signature: j5awbo6z7uiqprdrg8gg6ae7uhb8bwgo X-Rspamd-Queue-Id: 7EA7A40006 X-Rspamd-Server: rspam11 X-Rspam-User: Authentication-Results: imf01.hostedemail.com; dkim=none; spf=pass (imf01.hostedemail.com: domain of rongwei.wang@linux.alibaba.com designates 115.124.30.133 as permitted sender) smtp.mailfrom=rongwei.wang@linux.alibaba.com; dmarc=pass (policy=none) header.from=alibaba.com X-HE-Tag: 1655519639-512718 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 6/17/22 10:19 PM, Christoph Lameter wrote: > 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 It's the same environment. I can sure. And there are four nodes (32G per-node and 8 cores per-node) in my test environment. whether I need to test in one node? If right, I can try. > >> 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? Maybe because of four nodes in my system or only 8 cores (very small) in each node? Thanks, you remind me that I need to increase core number of each node or change node number to compere the results. Thanks!