lkml.org 
[lkml]   [2012]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/8] cgroup: kill cgroup_subsys->__DEPRECATED_clear_css_refs
On Wed 31-10-12 12:44:03, Tejun Heo wrote:
[...]
> local_irq_save/restore() from cgroup_clear_css_refs() are replaced
> with local_irq_disable/enable() for simplicity. This is safe as
> cgroup_rmdir() is always called with IRQ enabled. Note that this IRQ
> switching is necessary to make CSS deactivation and CSS_REMOVED
> assertion atomic against css_tryget() and will be removed by future
> changes.

local_irq_disable doesn't guarantee atomicity, because other CPUs will
see the change in steps so this is a bit misleading. The real reason
AFAICS is that we do not want to hang in css_tryget from IRQ context
(does this really happen btw.?) which would interrupt cgroup_rmdir
between we add CSS_DEACT_BIAS and the group is marked CGRP_REMOVED.
Or am I still missing the point?
[...]
--
Michal Hocko
SUSE Labs


\
 
 \ /
  Last update: 2012-10-31 21:21    [W:0.175 / U:1.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site