Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1048907iog; Mon, 13 Jun 2022 20:07:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPXmInmamC68HhzGBMrfo9+ifnKMUtPv5r+FKghrF/AHVcL/tZ7g32op/d6oNbl9mDxR1I X-Received: by 2002:a17:902:e1cc:b0:164:1517:e8bf with SMTP id t12-20020a170902e1cc00b001641517e8bfmr2270451pla.98.1655176020626; Mon, 13 Jun 2022 20:07:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655176020; cv=none; d=google.com; s=arc-20160816; b=UeWRO8b89V27CKk7U6as9XMDDTSZ1OVCS0p+KvWl6FiSqbyByhnI66S5Bsga14NweP ogP4CI5Jzs+NX86fmqV1tOmv1pjJzpoyLPb/iLXB3U1CPtuaSZOhW1nsXgoNhXuHyPq8 NgQz219ZGcCh/FA/Bw9cYddR/Lu91rUU5arrBootcE6zQBDonOXOYhHRDCRnUA2Mgnp0 QiUC2iiZkle1/WOyGtWyFw/D60Qrh7zmgEQIKahSMSBg6hvLtxLkjNgvvNabcvrzGEdM oxgoYxKTuPRePaHoLRxc3ui8EMBP+OibjpRwIOO6QcGZIUZ+pSS0rayj17cp5Synk1LS oT+w== 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=lNkdvs4HUl/e+RqqocIcgcUptQZO39VG19AdH897D/Y=; b=VE5/yx4EfgqUK7ScJQe/Y7uOpFcWe6Kp8TpmlToG2U2bI1CzyxQ2NKT4oQoRV6t9C9 +qd62kxJUXASbZw9y+yQE6MwScX/E9TwFiI/PTy9g7rzGhpe55oPyK6Nojsy11QVhQva K2qGUtIKOdwq79ce8C5iGxKDpHIHXhrk+SlZ4ntptPtbt/eYZCndEn64k30gx205IZgl LyYZABWTKDVoWwOwpfnsWgFhC/gQnrlUUCdRg0ZpJnXrp577fHTeew+Ldbr0rZwoqCds FXDiHrJI8t/LlbFSz6snWBV1G9AEHaNtfofC2x/kV/JL2HGki2AmDjhwsAa+JF1X0jxV CMOQ== 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 x190-20020a6386c7000000b003fcbcd9812dsi11635209pgd.521.2022.06.13.20.06.48; Mon, 13 Jun 2022 20:07:00 -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 S1353016AbiFNCzq (ORCPT + 99 others); Mon, 13 Jun 2022 22:55:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242249AbiFNCzc (ORCPT ); Mon, 13 Jun 2022 22:55:32 -0400 Received: from out30-130.freemail.mail.aliyun.com (out30-130.freemail.mail.aliyun.com [115.124.30.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8D8D3B3C9 for ; Mon, 13 Jun 2022 19:38:07 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R141e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04400;MF=rongwei.wang@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0VGLIXr6_1655174282; Received: from 30.240.98.139(mailfrom:rongwei.wang@linux.alibaba.com fp:SMTPD_---0VGLIXr6_1655174282) by smtp.aliyun-inc.com; Tue, 14 Jun 2022 10:38:03 +0800 Message-ID: Date: Tue, 14 Jun 2022 10:38:01 +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 , penberg@kernel.org 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, 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> From: Rongwei Wang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.4 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SCC_BODY_URI_ONLY,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=no 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/13/22 9:50 PM, Christoph Lameter wrote: > On Sat, 11 Jun 2022, Rongwei Wang wrote: > >>> Ok so the idea is to take the lock only if kmem_cache_debug. That looks >>> ok. But it still adds a number of new branches etc to the free loop. >>> >>> Some performance tests would be useful. >> Hi Christoph >> >> Thanks for your time! >> Do you have some advice in benchmarks that need me to test? And I find that >> hackbench and lkp was used frequently in mm/slub.c commits[1,2]. But I have no >> idea how to use these two benchmarks test to cover the above changes. Can you >> give some examples? Thanks very much! > > > Hi Rongwei, > > Well run hackbench with an without the change. OK > > There are also synthetic benchmarks available at > https://gentwo.org/christoph/slub/tests/ That's great, thanks very much! > > These measure the cycles that slab operations take. However, they are a > bit old and I think Pekka may have a newer version of these > patches. > > Greetings, > Christoph