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=-5.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, 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 04FD4C433E1 for ; Tue, 11 Aug 2020 12:52:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BF7BE2076B for ; Tue, 11 Aug 2020 12:52:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BF7BE2076B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 296036B0005; Tue, 11 Aug 2020 08:52:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 245DA6B0007; Tue, 11 Aug 2020 08:52:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 135488D0001; Tue, 11 Aug 2020 08:52:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0048.hostedemail.com [216.40.44.48]) by kanga.kvack.org (Postfix) with ESMTP id EE1CE6B0005 for ; Tue, 11 Aug 2020 08:52:36 -0400 (EDT) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 7A1261E03 for ; Tue, 11 Aug 2020 12:52:36 +0000 (UTC) X-FDA: 77138276712.11.plane34_630197e26fe3 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin11.hostedemail.com (Postfix) with ESMTP id 41B72180F8B80 for ; Tue, 11 Aug 2020 12:52:36 +0000 (UTC) X-HE-Tag: plane34_630197e26fe3 X-Filterd-Recvd-Size: 2719 Received: from gentwo.org (gentwo.org [3.19.106.255]) by imf34.hostedemail.com (Postfix) with ESMTP for ; Tue, 11 Aug 2020 12:52:35 +0000 (UTC) Received: by gentwo.org (Postfix, from userid 1002) id 15CC43F447; Tue, 11 Aug 2020 12:52:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id 1310B3F043; Tue, 11 Aug 2020 12:52:35 +0000 (UTC) Date: Tue, 11 Aug 2020 12:52:35 +0000 (UTC) From: Christopher Lameter X-X-Sender: cl@www.lameter.com To: Pekka Enberg cc: Vlastimil Babka , Xunlei Pang , Andrew Morton , Wen Yang , Yang Shi , Roman Gushchin , "linux-mm@kvack.org" , LKML , Konstantin Khlebnikov , David Rientjes Subject: Re: [PATCH 1/2] mm/slub: Introduce two counters for the partial objects In-Reply-To: Message-ID: References: <1593678728-128358-1-git-send-email-xlpang@linux.alibaba.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 41B72180F8B80 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 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 Fri, 7 Aug 2020, Pekka Enberg wrote: > Why do you consider this to be a fast path? This is all partial list > accounting when we allocate/deallocate a slab, no? Just like > ___slab_alloc() says, I assumed this to be the slow path... What am I > missing? I thought these were per object counters? If you just want to count the number of slabs then you do not need the lock at all. We already have a counter for the number of slabs. > No objections to alternative fixes, of course, but wrapping the > counters under CONFIG_DEBUG seems like just hiding the actual issue... CONFIG_DEBUG is on by default. It just compiles in the debug code and disables it so we can enable it with a kernel boot option. This is because we have had numerous issues in the past with "production" kernels that could not be recompiled with debug options. So just running the prod kernel with another option will allow you to find hard to debug issues in a full scale producton deployment with potentially proprietary modules etc.