lkml.org 
[lkml]   [2015]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/5] memcg: export struct mem_cgroup
Hello,

On Fri, Jul 17, 2015 at 08:28:19AM -0400, Johannes Weiner wrote:
> > Meaning a new mm/memcontrol.h? That's a bit better I suppose.
>
> I meant as opposed to being private to memcontrol.c. I'm not sure I
> quite see the problem of having these definitions in include/linux, as
> long as we keep the stuff that is genuinely only used in memcontrol.c
> private to that file. But mm/memcontrol.h would probably work too.

cgroup writeback support interacts with writeback, memcg and blkcg, so
if we do that we'd end up doing #include "../mm/memcontrol.h" from fs
and prolly block. This is pretty much the definition of
cross-subsystem definitions which should go under include/linux.

mem_cgroup contains common fields which are useful across multiple
subsystems and there currently are quite a few silly accessors getting
in the way obscuring things. I get that we don't want to expose when
we don't have to but at the same time under situations like this we
usually expose the definition and try to mark public and internal
fields clearly. Maybe there are details to be improved but I think
it's about time mem_cgroup definition gets published.

Thanks.

--
tejun


\
 
 \ /
  Last update: 2015-07-17 17:41    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog