Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2211981pxa; Fri, 7 Aug 2020 06:06:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmNg3nn7oe/J9eSzciOl1EURov7Kqa0ITMw5uhl2hZLe5B/dbDOJIV2mYPybBnFv5cWRMN X-Received: by 2002:a17:906:4e57:: with SMTP id g23mr8925678ejw.92.1596805612507; Fri, 07 Aug 2020 06:06:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596805612; cv=none; d=google.com; s=arc-20160816; b=gb0l9mUJg1zDvE9+eMHfrpppGB1c+KDcwFMwFJAXptg0ybcZACAG74TynS4EooceMC i5fLBJaWZP4tL4q3fHX5H6S5DKQ8xSQ7/47iec0xVhoS1kdssYP/GMmcKF+1DXpLIvYt uAaDCuBtXGjgnYgUTXGyHdsvPW3i8xSW50mexUstYkgMmVYb64nqIKyG3fwjVQqMxCZm FJxV7frexLmkD/ZqgZTIiduXh0glK/JiaWvUXZLGypGny7HF9/bComMrvYhDOF1w3VZR USMHr2Z1OgxCflXIEbPf1WLCGKcIBTZrMcr5bcXNkbEnuHSD4sSJ1ME3v3Wp1ZgbR5/O VClg== 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=Xbzm2Z2fd1mFFFVmMUuPqora2k/Q8thiJ6sqXwJrf4w=; b=TCgeLOOFqpFbUZWfnXGOJ2zY0txLWqyvmshcLkVC87+C2Umv5hj4c6BROVWUygoFCW oeJx9bFD+t8LTru5iBEVx88/QhsNYJSDVA0fY3iF7A/4oGqzgw3ri4ej67WeUT7bDKnR EH+SOlUswV4LnDf9MMl7NZnLyiTVZf04WNoH+pIvilqjDbybDy71UzaDJsbBCarRNY8m 9XHw3tzJk1wwGdkOUowH4JFAlVBhKcUx1MlTpUHJYjSJwi/6at7gpmlBgEvtygmW5qin j99rFtDZwZoQSK/9xtS4y7BpIWwzpcn3zUb82gdgWAlp72t6V8/VXpiylK2KoTAOapTf 6zbQ== 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 j8si5102302edk.610.2020.08.07.06.06.28; Fri, 07 Aug 2020 06:06:52 -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 S1726150AbgHGNCo (ORCPT + 99 others); Fri, 7 Aug 2020 09:02:44 -0400 Received: from gentwo.org ([3.19.106.255]:35074 "EHLO gentwo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725936AbgHGNCo (ORCPT ); Fri, 7 Aug 2020 09:02:44 -0400 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 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: > 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 .... ;-)