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 X-Spam-Level: X-Spam-Status: No, score=-7.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05D5AC433DF for ; Mon, 24 Aug 2020 10:04:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BA5BF2071E for ; Mon, 24 Aug 2020 10:04:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BA5BF2071E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0DE016B0002; Mon, 24 Aug 2020 06:04:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 08FBB6B0005; Mon, 24 Aug 2020 06:04:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EE6786B0006; Mon, 24 Aug 2020 06:04:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0172.hostedemail.com [216.40.44.172]) by kanga.kvack.org (Postfix) with ESMTP id D5F346B0002 for ; Mon, 24 Aug 2020 06:04:30 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 8C117180AD82F for ; Mon, 24 Aug 2020 10:04:30 +0000 (UTC) X-FDA: 77185027500.05.cars84_4d11a0727052 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin05.hostedemail.com (Postfix) with ESMTP id 5CDC41826B6B2 for ; Mon, 24 Aug 2020 10:04:30 +0000 (UTC) X-HE-Tag: cars84_4d11a0727052 X-Filterd-Recvd-Size: 3796 Received: from out30-43.freemail.mail.aliyun.com (out30-43.freemail.mail.aliyun.com [115.124.30.43]) by imf41.hostedemail.com (Postfix) with ESMTP for ; Mon, 24 Aug 2020 10:04:28 +0000 (UTC) X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R741e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01f04427;MF=xlpang@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0U6giGpr_1598263465; Received: from xunleideMacBook-Pro.local(mailfrom:xlpang@linux.alibaba.com fp:SMTPD_---0U6giGpr_1598263465) by smtp.aliyun-inc.com(127.0.0.1); Mon, 24 Aug 2020 18:04:25 +0800 Reply-To: xlpang@linux.alibaba.com Subject: Re: [PATCH v2 0/3] mm/slub: Fix count_partial() problem To: Pekka Enberg Cc: Vlastimil Babka , Christoph Lameter , Wen Yang , Roman Gushchin , Konstantin Khlebnikov , David Rientjes , LKML , "linux-mm@kvack.org" References: <1597061872-58724-1-git-send-email-xlpang@linux.alibaba.com> From: xunlei Message-ID: Date: Mon, 24 Aug 2020 18:04:25 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 X-Rspamd-Queue-Id: 5CDC41826B6B2 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 Content-Transfer-Encoding: quoted-printable 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 2020/8/20 =E4=B8=8B=E5=8D=8810:02, Pekka Enberg wrote: > On Mon, Aug 10, 2020 at 3:18 PM Xunlei Pang = wrote: >> >> v1->v2: >> - Improved changelog and variable naming for PATCH 1~2. >> - PATCH3 adds per-cpu counter to avoid performance regression >> in concurrent __slab_free(). >> >> [Testing] >> On my 32-cpu 2-socket physical machine: >> Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz >> perf stat --null --repeat 10 -- hackbench 20 thread 20000 >> >> =3D=3D original, no patched >> 19.211637055 seconds time elapsed = ( +- 0.57% ) >> >> =3D=3D patched with patch1~2 >> Performance counter stats for 'hackbench 20 thread 20000' (10 runs): >> >> 21.731833146 seconds time elapsed = ( +- 0.17% ) >> >> =3D=3D patched with patch1~3 >> Performance counter stats for 'hackbench 20 thread 20000' (10 runs): >> >> 19.112106847 seconds time elapsed = ( +- 0.64% ) >> >> >> Xunlei Pang (3): >> mm/slub: Introduce two counters for partial objects >> mm/slub: Get rid of count_partial() >> mm/slub: Use percpu partial free counter >> >> mm/slab.h | 2 + >> mm/slub.c | 124 +++++++++++++++++++++++++++++++++++++++++++----------= --------- >> 2 files changed, 89 insertions(+), 37 deletions(-) >=20 > We probably need to wrap the counters under CONFIG_SLUB_DEBUG because > AFAICT all the code that uses them is also wrapped under it. /sys/kernel/slab/***/partial sysfs also uses it, I can wrap it with CONFIG_SLUB_DEBUG or CONFIG_SYSFS for backward compatibility. >=20 > An alternative approach for this patch would be to somehow make the > lock in count_partial() more granular, but I don't know how feasible > that actually is. >=20 > Anyway, I am OK with this approach: >=20 > Reviewed-by: Pekka Enberg Thanks! >=20 > You still need to convince Christoph, though, because he had > objections over this approach. Christoph, what do you think, or any better suggestion to address this *in production* issue? >=20 > - Pekka >=20