Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1078759pxb; Thu, 4 Mar 2021 02:41:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJwSMcKABpTFfQVl7AZTkmUfJDXkIwhfj6W+X6G4W5xdqFBku2N19DKl+aFpRKgAmHGUZLy7 X-Received: by 2002:a50:bf42:: with SMTP id g2mr3555799edk.101.1614854495528; Thu, 04 Mar 2021 02:41:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614854495; cv=none; d=google.com; s=arc-20160816; b=k/UVgC1kCFdVlCN0SjXS+zjERMLK/pC7xB+ey6obiGlKwfPSMWifeBC1MPukJN998t I0rl6t0xBbIdj0JbDdViLE8/BcYbuQ9BPz4SppX06GiUSHhytul5t+YC9JYXtWQEVbih RHSgjMh3aX2LqGnnZvm+TCeNYThoGmyjRVF9AML8+KSJgg4aPZeGB8b5STeEVT8iD2YS vD71yGDKQmhqmWAMwA3ZdV1xaPgt0dse1nzcHj3Zowju3ZSPEQfFiQGRnL5jOWP0AYZ8 IJ/woy89+saX4bHRcenJHYf8A0/w9J9dK8jmSjZbWmA8oF2dS4CSLlB2KCccd/Il6ZTg 9kVg== 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 :mime-version:user-agent:date:message-id:from:references:cc:to :subject:reply-to; bh=iPBw5EdkUcTss2+aOp0AGqVTUoAAaewhklIf1hFrwaI=; b=rSc1WMj3/ToGp6OohzszpeqgtZhS78I0KRAsDkOKhUEkeKqHs4/+b7jxn3Q/2r7sp8 4j/gCkU1sdKCq4/l2FjML9B1KIXfCL/hJEaLNVmX6TPbE+oVStePxAO0h/FwnnW+zYUY BecKlwZDAPysJOyL2AY8DRn6AkK06tVrEiPrlIeWiooboqM2eANY2AcESAKaYXwC/Z8f fzFpc9vb23PEeUCQZ5bPGDo5/c/pm2d7OK42/+CP5XA7inpvzroOtn7tYBoYFiWtVp5a UQt+NsvFM9F1hvGHQAK0YD4ngUcOuTv01S0U5VthSR/Ju447td5cjOtzzW2MJradNsW8 VqBw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id se21si16719159ejb.362.2021.03.04.02.41.13; Thu, 04 Mar 2021 02:41:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1385536AbhCCRUZ (ORCPT + 99 others); Wed, 3 Mar 2021 12:20:25 -0500 Received: from out30-42.freemail.mail.aliyun.com ([115.124.30.42]:34466 "EHLO out30-42.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233874AbhCCNmt (ORCPT ); Wed, 3 Mar 2021 08:42:49 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=xlpang@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0UQGHx3l_1614778477; Received: from xunleideMacBook-Pro.local(mailfrom:xlpang@linux.alibaba.com fp:SMTPD_---0UQGHx3l_1614778477) by smtp.aliyun-inc.com(127.0.0.1); Wed, 03 Mar 2021 21:34:38 +0800 Reply-To: xlpang@linux.alibaba.com Subject: Re: [PATCH v2 0/3] mm/slub: Fix count_partial() problem To: Shu Ming , xlpang@linux.alibaba.com Cc: Pekka Enberg , 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 Pang Message-ID: Date: Wed, 3 Mar 2021 21:34:37 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3/1/21 6:31 PM, Shu Ming wrote: > Any progress on this? The problem addressed by this patch has also > made jitters to our online apps which are quite annoying. > Thanks for the attention. There's some further improvements on v2, I'm gonna send v3 out later. > On Mon, Aug 24, 2020 at 6:05 PM xunlei wrote: >> >> On 2020/8/20 下午10: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 >>>> >>>> == original, no patched >>>> 19.211637055 seconds time elapsed ( +- 0.57% ) >>>> >>>> == patched with patch1~2 >>>> Performance counter stats for 'hackbench 20 thread 20000' (10 runs): >>>> >>>> 21.731833146 seconds time elapsed ( +- 0.17% ) >>>> >>>> == 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(-) >>> >>> 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. >> >>> >>> 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. >>> >>> Anyway, I am OK with this approach: >>> >>> Reviewed-by: Pekka Enberg >> >> Thanks! >> >>> >>> 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? >> >>> >>> - Pekka >>>