Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp999598iog; Fri, 17 Jun 2022 20:22:17 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tUrK+HQIqJYmV/ZqAAfjWA9hLegOtew7vF0bHInLBL24GXP62AtUaNykhX2bXAKC+4W4nF X-Received: by 2002:a17:907:6e13:b0:711:c722:4fc with SMTP id sd19-20020a1709076e1300b00711c72204fcmr11890116ejc.253.1655522536930; Fri, 17 Jun 2022 20:22:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655522536; cv=none; d=google.com; s=arc-20160816; b=Fw7ZvEwKHV3wBbnvYnN289w/BIpLDx47PWR71qH4fo80SY7cp7dvb1td8v4bO3EbS8 gDuJe5uNAw+dkPvQRRYVjqGX/MwhtcnlfIYrkI+V5P5W5+oAhPHeXjvtt4PpoFvMp/y+ DIbZbRb8e4H46bjAF+1GfeKZYToRqAOynCxIM/CaFIUS7jmAxbaLaxnvWcr5MqGqWW2M RlqpVRPlFcWDBVa/HnEkP4KOuT9yunheriLUOV1BDzQGLP7vyB3DitJR5gsBHbPGERjK b23O/F8zKIT/gCD/cMl/Zg5HV9ZMSJgLLPEyMKwoU3NAt76jJzh1wg9IIU7f4Vb98+9E dA7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=0mGJbeZt5iEuAT2hvxVQ7Z/zdoLesPsk66g4yqHS5Fg=; b=jW7PB71TXsTynwRzEFUwsfcteKbtQBT/5g+Q0+iqfc+bq4YaA2gyboRy37pKFrIIh0 cd7Bc8lUHvW44GEssmryJh5904LkmEUm1L8+i92QMI9vHvqZR94XcAX6bMtMANm12uVL GYPDG+wiJI7KeCiJFnJBzzMUbvaEaIfHHH9XMLlh+zKWHmaooVXjTsXIs58fFtGwM8Z6 npqke2NPX5SFd7X19jHjKmsV/+NOLflJEWR0MfPewWOj4r0H38xL2vFm+o3nOcC555U5 MrN4JkfHBv+N2U1MZcekZZ/NuN4K97/mSXVYVTLV69x7OvTDSf12g1KdHjjU41y8F2/d hujQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hc9-20020a170907168900b006f40efd4b88si3225952ejc.812.2022.06.17.20.21.51; Fri, 17 Jun 2022 20:22:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1383867AbiFRCeB (ORCPT + 99 others); Fri, 17 Jun 2022 22:34:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231748AbiFRCeA (ORCPT ); Fri, 17 Jun 2022 22:34:00 -0400 Received: from out30-57.freemail.mail.aliyun.com (out30-57.freemail.mail.aliyun.com [115.124.30.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 476423C4BA for ; Fri, 17 Jun 2022 19:33:59 -0700 (PDT) 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 X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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!