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.3 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 BF8C3C5DF60 for ; Fri, 8 Nov 2019 16:49:14 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8BF642178F for ; Fri, 8 Nov 2019 16:49:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8BF642178F 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 1F67B6B0008; Fri, 8 Nov 2019 11:49:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 1591B6B000A; Fri, 8 Nov 2019 11:49:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 06E366B000C; Fri, 8 Nov 2019 11:49:14 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0070.hostedemail.com [216.40.44.70]) by kanga.kvack.org (Postfix) with ESMTP id E3B956B0008 for ; Fri, 8 Nov 2019 11:49:13 -0500 (EST) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id A412B180AD815 for ; Fri, 8 Nov 2019 16:49:13 +0000 (UTC) X-FDA: 76133695386.30.maid71_6d9ea02c0c440 X-HE-Tag: maid71_6d9ea02c0c440 X-Filterd-Recvd-Size: 2879 Received: from gentwo.org (gentwo.org [3.19.106.255]) by imf39.hostedemail.com (Postfix) with ESMTP for ; Fri, 8 Nov 2019 16:49:13 +0000 (UTC) Received: by gentwo.org (Postfix, from userid 1002) id 535953E957; Fri, 8 Nov 2019 16:49:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id 527E63E89A; Fri, 8 Nov 2019 16:49:12 +0000 (UTC) Date: Fri, 8 Nov 2019 16:49:12 +0000 (UTC) From: Christopher Lameter X-X-Sender: cl@www.lameter.com To: Knut Omang cc: Michal Hocko , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton Subject: Re: [PATCH] mm: provide interface for retrieving kmem_cache name In-Reply-To: Message-ID: References: <20191107115404.3030723-1-knut.omang@oracle.com> <20191107115806.GP8314@dhcp22.suse.cz> <27006f47b0b85fb99acee2a638207268aef8d010.camel@oracle.com> <20191107131342.GT8314@dhcp22.suse.cz> 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 Fri, 8 Nov 2019, Knut Omang wrote: > On Fri, 2019-11-08 at 15:37 +0000, Christopher Lameter wrote: > > On Thu, 7 Nov 2019, Michal Hocko wrote: > > > > > On Thu 07-11-19 13:26:09, Knut Omang wrote: > > > > On Thu, 2019-11-07 at 12:58 +0100, Michal Hocko wrote: > > > > > On Thu 07-11-19 12:54:04, Knut Omang wrote: > > > > > > With the restructuring done in commit 9adeaa226988 > > > > > > ("mm, slab: move memcg_cache_params structure to mm/slab.h") > > > > > > > > > > > > it is no longer possible for code external to mm to access > > > > That patch only affected the memcg_cache_params structure and not > > kmem_cache. > > > > And I do not see any references to the memcg_cache_param? > > Good point, I should have made explicit reference to it. > > It gets inlined into kmem_cache with CONFIG_SLUB if CONFIG_MEMCG is set > (include/linux/slub_def.h, line 112) Yes but that does not affect the "name" field on line 105 > > The fields that all allocators need to expose are listed in > > the struct kmme_cache definition in linux/mm/slab.h. > > So I take that kmem_cache::name was still intended to be public, > just that that broke due to the inlining of struct memcg_cache_param > in slub_def.h? The patch did not change the name field. I am not sure what is broken? Maybe you need memcg_params to compose a name of the memcg with the slab name?