Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp391850pxa; Tue, 11 Aug 2020 05:53:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIAIgnbAeCqzpKiEvxC46fea06gu/SVTD9HOum8RU6yk4Qza5ws5qbsXkCqIK4jNGHwuj5 X-Received: by 2002:a17:906:cecd:: with SMTP id si13mr12002355ejb.96.1597150431821; Tue, 11 Aug 2020 05:53:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597150431; cv=none; d=google.com; s=arc-20160816; b=h38Ta3TXeX6/6bMBaPVPgi7CwPRcFPiVkpJNtZrHLjEwQBrDiGQ2DUfx7LyDC006hS YWEgkjK8EEfu33ntjjjNUllPasto4p3MTSF3qeiOiMcm3NzP0T2xoEjPITFz9nt/NphR F+QXhHMHEhYSkCFRAWMwwiwY9Vs/2wQ+7FEUnvkRvhbp+Z2zkECGSArpeRGBee+zNzYt NXb3AJqJFsmhV8zK8sOX6/FXyulX+hCzPBb27KuFx1eDexk5zlD7gS0mPEc8tC7qHkOC cDQV0n0OveB96ITVFCmCf8jwv3Cx67lC1B7XOfMo6ZTGlgfs7tWwnfxJejjaOlM3iT1Z D0Zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=P57X1MtDfTdYOftoS63rlX7Xe9x/uzB4qEWgEQnl8yA=; b=BJf/JC010czjBzWxoLDYnj5kuEOUnL8+6sHTY7F3H0CUO8vPPDVzL3UPkIFd9XqpaT YLsiw2NEaw412FzJE0Rq0Il+8nHp+nbd0+XB5a80SfC0ZMEclv5WdVqkXVb4Rv0db6EZ 9Xk7vj4O1ipZ/VfjOOvknre/LHIOnltSkK0lhBUTF5GbLvz2nDss/iOd49sTQFsHi1+v uSYtF/fs+2WxlnshtPspkiVI1r65qxT3FbM6Bw/f+wHu0BCWA3PDw0/I4QkIvBqknGxl wRFLVmDYFhbN37qvelU+XOjseYRi19JcqBd6aeydbd60Yp6rcmvjPG5APt9bJfYBqgg7 e/eQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bs4si12060198edb.568.2020.08.11.05.53.27; Tue, 11 Aug 2020 05:53:51 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728556AbgHKMwg (ORCPT + 99 others); Tue, 11 Aug 2020 08:52:36 -0400 Received: from gentwo.org ([3.19.106.255]:35610 "EHLO gentwo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726829AbgHKMwf (ORCPT ); Tue, 11 Aug 2020 08:52:35 -0400 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.