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=-2.2 required=3.0 tests=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 A7657C2BA1A for ; Sat, 25 Apr 2020 02:10:26 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6BA0A20748 for ; Sat, 25 Apr 2020 02:10:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6BA0A20748 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 006F68E0005; Fri, 24 Apr 2020 22:10:26 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EF91F8E0003; Fri, 24 Apr 2020 22:10:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E0EF98E0005; Fri, 24 Apr 2020 22:10:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0217.hostedemail.com [216.40.44.217]) by kanga.kvack.org (Postfix) with ESMTP id CA4698E0003 for ; Fri, 24 Apr 2020 22:10:25 -0400 (EDT) Received: from smtpin21.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 8B1C35DE7 for ; Sat, 25 Apr 2020 02:10:25 +0000 (UTC) X-FDA: 76744748010.21.map71_5afe362592a27 X-HE-Tag: map71_5afe362592a27 X-Filterd-Recvd-Size: 2185 Received: from gentwo.org (gentwo.org [3.19.106.255]) by imf31.hostedemail.com (Postfix) with ESMTP for ; Sat, 25 Apr 2020 02:10:25 +0000 (UTC) Received: by gentwo.org (Postfix, from userid 1002) id 96F853F57C; Sat, 25 Apr 2020 02:10:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id 949283E8A0; Sat, 25 Apr 2020 02:10:24 +0000 (UTC) Date: Sat, 25 Apr 2020 02:10:24 +0000 (UTC) From: Christopher Lameter X-X-Sender: cl@www.lameter.com To: Roman Gushchin cc: Andrew Morton , Johannes Weiner , Michal Hocko , linux-mm@kvack.org, kernel-team@fb.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 04/19] mm: slub: implement SLUB version of obj_to_index() In-Reply-To: <20200423000530.GA63356@carbon.lan> Message-ID: References: <20200422204708.2176080-1-guro@fb.com> <20200422204708.2176080-5-guro@fb.com> <20200423000530.GA63356@carbon.lan> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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 Wed, 22 Apr 2020, Roman Gushchin wrote: > On Wed, Apr 22, 2020 at 11:52:13PM +0000, Christoph Lameter wrote: > > On Wed, 22 Apr 2020, Roman Gushchin wrote: > > > > > enum stat_item { > > > ALLOC_FASTPATH, /* Allocation from cpu slab */ > > > @@ -86,6 +87,7 @@ struct kmem_cache { > > > unsigned long min_partial; > > > unsigned int size; /* The size of an object including metadata */ > > > unsigned int object_size;/* The size of an object without metadata */ > > > + struct reciprocal_value reciprocal_size; > > > > > > This needs to be moved further back since it is not an item that needs to > > be cache hot for the hotpaths. > > It could be relatively hot, because it's accessed for reading on every > accounted allocation. The patch seems to only use it for setup and debugging? It is used for every "accounted" allocation???? Where? And what is an "accounted" allocation?