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=-14.9 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1, USER_IN_DEF_DKIM_WL autolearn=ham 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 63A03C5DF60 for ; Thu, 7 Nov 2019 20:50:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 23150218AE for ; Thu, 7 Nov 2019 20:50:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="QcOIF8To" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 23150218AE Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id AF6746B0003; Thu, 7 Nov 2019 15:50:58 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id AA6D26B0006; Thu, 7 Nov 2019 15:50:58 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9E42B6B0007; Thu, 7 Nov 2019 15:50:58 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0138.hostedemail.com [216.40.44.138]) by kanga.kvack.org (Postfix) with ESMTP id 879C26B0003 for ; Thu, 7 Nov 2019 15:50:58 -0500 (EST) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id 26C84181AEF1D for ; Thu, 7 Nov 2019 20:50:58 +0000 (UTC) X-FDA: 76130675796.11.silk95_7cd028c05be00 X-HE-Tag: silk95_7cd028c05be00 X-Filterd-Recvd-Size: 4727 Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by imf38.hostedemail.com (Postfix) with ESMTP for ; Thu, 7 Nov 2019 20:50:57 +0000 (UTC) Received: by mail-pl1-f193.google.com with SMTP id y24so2398137plr.12 for ; Thu, 07 Nov 2019 12:50:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=4FmP6QMYk1IkFwbyuKk54A754mIP1LbWO9TYLDO2YAk=; b=QcOIF8ToXXUNDLnRYvQMOYyW3Y2152JdCRnI2QGfLcE7DnYHKOAwUpGCas3zVnbdts JwFC7ITEwLsE6+Uqwf1opM9ccn2MVaiYuac+5/QQzPHs3j9NAlIK72GHv1lO0ZO5QZDr pkj4MpIXLFr4KC+tjvLB+eLNApFrcCgDKhmZblVX8iN4pvjjWPdpqdgF8kDi1OL7YgqD fSyH4ifbx+/ZQvlWiJw15XBCkw2T50HDpSDh/MmlH0kuS/34SdRU+9hlWayf/JLTW0AL GMn/opEE907sjYT9m7vU2++h8FgKoEMRMH8v8BOIGUMGjpUHrgEKKwN8pmLFdt23oa4t wBZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=4FmP6QMYk1IkFwbyuKk54A754mIP1LbWO9TYLDO2YAk=; b=flE2G5NjZq0xjFgjSxsU0CwJ2vwnv0v1VDScdsAZEBHWp81TUelOQ0XJtnrZGiWcEA AQoeJjIAqeQx/grhBAekJnbTuLP9PA/C1xDUmlHdVkKkWMu2VRhMSi4UxFrSl2Vx2AJT rh24GAzM7LGt0Ii3DiDViedeS8kpxOj+K4KjonJOofAmMy70CByR/HHcHsx2gmGLvaLW heDEXmJvxutzoMZyi6SNstX9tpsZiXajwcKrgjYye/r3x4leoCU8AaAZtj+GCHkSf0h2 /M1Fws29VrpmNl3Cw479gBG0/3D4cZMXExM7YR+5h59AAUWYzbTHKuu1hM8Q+pAh7uWn EkiA== X-Gm-Message-State: APjAAAV78pZsU6sgBYJjL8g5gLDxfzGR8WFPZGYofNyos5AB0VBL1G4q S6RYaSZBUiLdsp4guP2n7TFcG2SXnS4= X-Google-Smtp-Source: APXvYqwO5GehOhU32jz/YkcMlk9BzDZHtY0pqTpMDHcPTzIWyIz6YHuSsyrEGouPkAh50h8K5lebCQ== X-Received: by 2002:a17:90a:80cc:: with SMTP id k12mr8290533pjw.58.1573159856540; Thu, 07 Nov 2019 12:50:56 -0800 (PST) Received: from [2620:15c:17:3:3a5:23a7:5e32:4598] ([2620:15c:17:3:3a5:23a7:5e32:4598]) by smtp.gmail.com with ESMTPSA id ay16sm9285223pjb.2.2019.11.07.12.50.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Nov 2019 12:50:55 -0800 (PST) Date: Thu, 7 Nov 2019 12:50:55 -0800 (PST) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Michal Hocko cc: Knut Omang , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Christoph Lameter , Pekka Enberg , Joonsoo Kim , Andrew Morton Subject: Re: [PATCH] mm: provide interface for retrieving kmem_cache name In-Reply-To: <20191107131342.GT8314@dhcp22.suse.cz> 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.000002, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 > > > > the name of a kmem_cache as struct kmem_cache has effectively become > > > > opaque. Having access to the cache name is helpful to kernel testing > > > > infrastructure. > > > > > > > > Expose a new function kmem_cache_name to mitigate that. > > > > > > Who is going to use that symbol? It is preferred that a user is added in > > > the same patch as the newly added symbol. > > > > Yes, I am aware that that's the normal practice, > > we're currently using cache->name directly in the kernel > > unit test framework KTF (https://github.com/oracle/ktf/) > > which we are working (https://lkml.org/lkml/2019/8/13/111) to get > > into the kernel in one form or another. > > Please add the export with a patch that really needs it. > Agree, this patch could be added as a predecessor to the series at https://lkml.org/lkml/2019/8/13/111 which would use it. If it's obvious why using the kmem cache name is useful in that series, acking this will be a no brainer.