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 EFD23C55186 for ; Wed, 22 Apr 2020 23:52:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D99E02076E for ; Wed, 22 Apr 2020 23:52:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726228AbgDVXwO (ORCPT ); Wed, 22 Apr 2020 19:52:14 -0400 Received: from gentwo.org ([3.19.106.255]:35098 "EHLO gentwo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725846AbgDVXwO (ORCPT ); Wed, 22 Apr 2020 19:52:14 -0400 Received: by gentwo.org (Postfix, from userid 1002) id B131B3EC02; Wed, 22 Apr 2020 23:52:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id B04793EBBA; Wed, 22 Apr 2020 23:52:13 +0000 (UTC) Date: Wed, 22 Apr 2020 23:52:13 +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: <20200422204708.2176080-5-guro@fb.com> Message-ID: References: <20200422204708.2176080-1-guro@fb.com> <20200422204708.2176080-5-guro@fb.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) 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 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. Place it with "align", inuse etc? Hmmm. the same applies to min_partial maybe? 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 DC601C55185 for ; Wed, 22 Apr 2020 23:52:15 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B3A9021582 for ; Wed, 22 Apr 2020 23:52:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B3A9021582 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 1B3508E0005; Wed, 22 Apr 2020 19:52:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 163838E0003; Wed, 22 Apr 2020 19:52:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 07A768E0005; Wed, 22 Apr 2020 19:52:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0060.hostedemail.com [216.40.44.60]) by kanga.kvack.org (Postfix) with ESMTP id E11AF8E0003 for ; Wed, 22 Apr 2020 19:52:14 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id AB208180AD822 for ; Wed, 22 Apr 2020 23:52:14 +0000 (UTC) X-FDA: 76737142188.05.blood41_4dc3560c5e438 X-HE-Tag: blood41_4dc3560c5e438 X-Filterd-Recvd-Size: 1759 Received: from gentwo.org (gentwo.org [3.19.106.255]) by imf08.hostedemail.com (Postfix) with ESMTP for ; Wed, 22 Apr 2020 23:52:14 +0000 (UTC) Received: by gentwo.org (Postfix, from userid 1002) id B131B3EC02; Wed, 22 Apr 2020 23:52:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id B04793EBBA; Wed, 22 Apr 2020 23:52:13 +0000 (UTC) Date: Wed, 22 Apr 2020 23:52:13 +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: <20200422204708.2176080-5-guro@fb.com> Message-ID: References: <20200422204708.2176080-1-guro@fb.com> <20200422204708.2176080-5-guro@fb.com> 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: > 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. Place it with "align", inuse etc? Hmmm. the same applies to min_partial maybe?