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 16C34C433DF for ; Fri, 7 Aug 2020 13:03:14 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CE1A3221E2 for ; Fri, 7 Aug 2020 13:03:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CE1A3221E2 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 535BC8D0090; Fri, 7 Aug 2020 09:03:13 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4E6BC8D003B; Fri, 7 Aug 2020 09:03:13 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3FDE38D0090; Fri, 7 Aug 2020 09:03:13 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0119.hostedemail.com [216.40.44.119]) by kanga.kvack.org (Postfix) with ESMTP id 299A88D003B for ; Fri, 7 Aug 2020 09:03:13 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id B6F5E180ACF84 for ; Fri, 7 Aug 2020 13:03:12 +0000 (UTC) X-FDA: 77123788224.01.shade43_5b05a0e26fc0 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin01.hostedemail.com (Postfix) with ESMTP id 70B88100520F3 for ; Fri, 7 Aug 2020 13:02:50 +0000 (UTC) X-HE-Tag: shade43_5b05a0e26fc0 X-Filterd-Recvd-Size: 2361 Received: from gentwo.org (gentwo.org [3.19.106.255]) by imf40.hostedemail.com (Postfix) with ESMTP for ; Fri, 7 Aug 2020 13:02:45 +0000 (UTC) Received: by gentwo.org (Postfix, from userid 1002) id 459743EA6D; Fri, 7 Aug 2020 13:02:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id 43B3F3EA37; Fri, 7 Aug 2020 13:02:43 +0000 (UTC) Date: Fri, 7 Aug 2020 13:02:43 +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: 70B88100520F3 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000004, 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: > I think we can just default to the counters. After all, if I > understood correctly, we're talking about up to 100 ms time period > with IRQs disabled when count_partial() is called. As this is > triggerable from user space, that's a performance bug whatever way you > look at it. Well yes under extreme conditions and this is only happening for sysfs counter retrieval. There could be other solutions to this. This solution here is penalizing evertu hotpath slab allocation for the sake of relatively infrequently used counter monitoring. There the possibility of not traversing the list ande simply estimating the value based on the number of slab pages allocated on that node. > Christoph, others, any objections? Obviously .... ;-)