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 C484AC433EF for ; Mon, 13 Jun 2022 13:58:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 44CF58D0187; Mon, 13 Jun 2022 09:58:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3FD3A8D0171; Mon, 13 Jun 2022 09:58:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2C5B58D0187; Mon, 13 Jun 2022 09:58:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 1BC028D0171 for ; Mon, 13 Jun 2022 09:58:08 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 5904421A0D for ; Mon, 13 Jun 2022 13:58:06 +0000 (UTC) X-FDA: 79573366572.04.2A83435 Received: from gentwo.de (gentwo.de [161.97.139.209]) by imf16.hostedemail.com (Postfix) with ESMTP id C86A018013D for ; Mon, 13 Jun 2022 13:57:56 +0000 (UTC) Received: by gentwo.de (Postfix, from userid 1001) id 218AAB0038E; Mon, 13 Jun 2022 15:50:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gentwo.de; s=default; t=1655128246; bh=P+2Eu0qhpYq7wlVABAoxSztYDseAwAfN1SZ+KJbEPI0=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=JSj5kCpwzNiybmfkJ9cFZFwFT/DLgMR/bHnf/I5OvjlhgCZtoN5aO84Qy6tAlA4FH /Euln5mYy8576zUa1anqLY2ywdFNGWn3N55zp8/PA7ugxgkJVOWabwrB9/sjNvJCKY Eb6nNfkUuDajbXroIBpmrO6QTFdoxmJSxJqOlkyT2KzDP79KFVE8/1yFtcaeI2jPSk Bx2S6/7TWrv59Litco30Rdhnl/+2IEateCvBF1Co0JP/F04DFU8FWVGAWDBqkdYCJx j06wuSCw9JewarHKp2BFaS2DkO9VEcauh+lqC+3jJ3s7tV2hNMIo2X7GWRKKiQmbhW tjTanhk0kLyWg== Received: from localhost (localhost [127.0.0.1]) by gentwo.de (Postfix) with ESMTP id 1F532B0034A; Mon, 13 Jun 2022 15:50:46 +0200 (CEST) Date: Mon, 13 Jun 2022 15:50:46 +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: <02298c0e-3293-9deb-f1ed-6d8862f7c349@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> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1655128676; 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=qIE0xwP1kuFNC2t5JxD7cYaMCl2XLZaK7Y4SfKIecsg=; b=p2owevHyIa/yqC29zaCvBEWHYpIzusFiPEi4ZXjAEKpK7lXWSWwSCST0rTzWAgNZCP0CkB sGqUbLX4m8Qvnq82KG/UtRl7gfJMTrVwzZOylqy0BFi8ncJ/SqBPDpqUNjqNEbC9QusdIU 9KTTQr3jDAp62TESo50vTq77bxakGRo= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655128676; a=rsa-sha256; cv=none; b=qHcJIm+WlzTQv7ymorBpRAD/6IYkxEBL2mmeGhJdUOv43pimlmm1DxBz4uT0ROTsbYiulp ms8aIzSsDBxZSfTU2c37Dq4VYE4mwd+CEC3h/Dxb44dfoZPHarTk4s6poUDtQE5nAPLicI gSswUELZ2mU+8LrYOxiKWfI35UeNsUM= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=gentwo.de header.s=default header.b=JSj5kCpw; dmarc=pass (policy=none) header.from=gentwo.de; spf=pass (imf16.hostedemail.com: domain of cl@gentwo.de designates 161.97.139.209 as permitted sender) smtp.mailfrom=cl@gentwo.de Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=gentwo.de header.s=default header.b=JSj5kCpw; dmarc=pass (policy=none) header.from=gentwo.de; spf=pass (imf16.hostedemail.com: domain of cl@gentwo.de designates 161.97.139.209 as permitted sender) smtp.mailfrom=cl@gentwo.de X-Stat-Signature: dacgnhtt941t4ic93rtrriyykw3anpoj X-Rspamd-Queue-Id: C86A018013D X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1655128676-107113 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 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. There are also synthetic benchmarks available at https://gentwo.org/christoph/slub/tests/ 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