[lkml]   [2019]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 1/2] mm: memcg: switch to css_tryget() in get_mem_cgroup_from_mm()

On Thu, Nov 14, 2019 at 08:33:40PM +0100, Michal Hocko wrote:
> > It is useful for controlling admissions of new userspace visible uses
> > - e.g. a tracepoint shouldn't be allowed to be attached to a cgroup
> > which has already been deleted.
> I am not sure I understand. Roman says that the cgroup can get offline
> right after the function returns. How is "already deleted" different
> from "just deleted"? I thought that the state is preserved at least
> while the rcu lock is held but my memory is dim here.

It's the same difference as between "opening a file and deleting it"
and "deleting a file and opening it". We shoud allow the former while
not allowing the latter.

> > We're just using it too liberally.
> Can we get a doc update to be explicit about sensible usecases so that
> others can be dropped accordingly?

Yeah, we should audit and convert the uses and update the doc.



 \ /
  Last update: 2019-11-14 20:38    [W:0.108 / U:0.844 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site