Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp2748824ybx; Fri, 8 Nov 2019 08:48:02 -0800 (PST) X-Google-Smtp-Source: APXvYqyA4RFQzKVBVz+SwC2wJ70NKo1BSDbsjKiD7aluEbsuaG4ss+1ELIuO2UBQ4GUTVgPFwSuL X-Received: by 2002:a50:90a6:: with SMTP id c35mr11314975eda.22.1573231682216; Fri, 08 Nov 2019 08:48:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573231682; cv=none; d=google.com; s=arc-20160816; b=o47F1gD+qWGRFlAw/vJlZ/OgksW/pZgU6tGj3SAl927UStxefXdjTl5u0ocFskQd3D 6BLhNusAtIthyapRCZH/KObnif5bzGCouSAER2B4rn5BTg+BXrzw3/WXJyqEbM2weMaR nlpGuBLo7Q+MxbRo9x/dpzPm6jdiH2R+Gb5AsZLGto0+uQVnXQdI6i1ibDaYpjcG/u5O Ga9LSqrsKGeOOD2wE6YKGtKVnN8FrGubyj28FMx9WUtHU1f1ST0u+GH63kQWTmwvHzgi yOPyGGRCLpgnzI9RO1Y8bkDyo0OsgdskgmnYE134btUst3ccQ8r9okxFS+6mV3VEUuq7 HE6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=hYfdkMRkteIIGT2KkzkdkMeBEpG1ri1et0Pk3CjcHd8=; b=uDSpzboGIqY3enVhEL072I+AyOKfyUyv91hZ8mi3z0ZY5zs1gNKt8XUBqALzPKZF0I fAWlG5N90g0NDSmJjyXVS7r01mYdp2jwsUPYBXZmJjI7cAYEFtqMHKkDSn0CSbFZv/Ee Mos78VBvaqUsLSAj0jNIjAmzimm7I9cgA1v8Wa8aGXOyS+N/Dl5WUXW1lLUMkHxdCkZP grYMVfrPyBDiAqEJnpP7bzurkzDp5dCOchniflNl0V30UBSHWRuaDRy2tdjyhFeeNvYE 8EPkoY7uyN1Hli+vJXt0q2VvZTkLv00pY2Fx1d3c5esD5PuQJH+Rol1fAkaog6TKnKrC Hxdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=E3x9+d1a; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a7si4166463edt.181.2019.11.08.08.47.38; Fri, 08 Nov 2019 08:48:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2019-08-05 header.b=E3x9+d1a; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727516AbfKHQod (ORCPT + 99 others); Fri, 8 Nov 2019 11:44:33 -0500 Received: from aserp2120.oracle.com ([141.146.126.78]:51850 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727149AbfKHQoc (ORCPT ); Fri, 8 Nov 2019 11:44:32 -0500 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id xA8GhtjN157379; Fri, 8 Nov 2019 16:44:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : subject : from : to : cc : date : in-reply-to : references : content-type : mime-version : content-transfer-encoding; s=corp-2019-08-05; bh=hYfdkMRkteIIGT2KkzkdkMeBEpG1ri1et0Pk3CjcHd8=; b=E3x9+d1a1S5vvXX4xu5lf8IHXRaRaQ7IIansWvtjg7s/E2HDCeWt8C4TUus78dgh6Wty e9rNBiuHKlzwAW/yrI+6lHdz7yooGEH8S2az8VH5YqEPKYJXzk2c+rDMJir3dwzWH9Dl ZTGMcuPUq7Btinbv5vEm9pzl47+qzSKFbnJDCzh27JCvxSekJRauM6p0uEd4hS3AVJn4 DEatjmazAsc37oX12zd32e5qFdeDzyrG1sqKtWAigHnH289i6JKQ9IDy7ZFYYhDPFc3x 3q5P/gcspWmZiz++HUVlnhzZLpfjsMvOAuvC+TUsUAqHLT9UykEXXAuZpyS9619mK44+ 5g== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2120.oracle.com with ESMTP id 2w41w16f6t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 08 Nov 2019 16:44:17 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id xA8GhmeS115175; Fri, 8 Nov 2019 16:44:16 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3020.oracle.com with ESMTP id 2w50m5nhms-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 08 Nov 2019 16:44:16 +0000 Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id xA8GiEeO031808; Fri, 8 Nov 2019 16:44:15 GMT Received: from asu (/92.220.18.196) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 08 Nov 2019 08:44:14 -0800 Message-ID: Subject: Re: [PATCH] mm: provide interface for retrieving kmem_cache name From: Knut Omang To: Christopher Lameter , Michal Hocko Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton Date: Fri, 08 Nov 2019 17:44:10 +0100 In-Reply-To: References: <20191107115404.3030723-1-knut.omang@oracle.com> <20191107115806.GP8314@dhcp22.suse.cz> <27006f47b0b85fb99acee2a638207268aef8d010.camel@oracle.com> <20191107131342.GT8314@dhcp22.suse.cz> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9434 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=921 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1910280000 definitions=main-1911080164 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9434 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=996 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1910280000 definitions=main-1911080164 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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) > 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? Knut