lkml.org 
[lkml]   [2019]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] mm: provide interface for retrieving kmem_cache name
From
Date
On Fri, 2019-11-08 at 16:49 +0000, Christopher Lameter wrote:
> 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?

No, it's just that the slub definition of struct kmem_cache won't compile because
the definition of struct memcg_cache_params is no longer available.

Knut

\
 
 \ /
  Last update: 2019-11-08 21:43    [W:0.029 / U:26.736 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site