Re: [RFC][PATCH] cgroup_threadgroup_rwsem - affects scalability and OOM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello, Balbir.

On Tue, Aug 09, 2016 at 05:02:47PM +1000, Balbir Singh wrote:
> > Hmm? Where does mem_cgroup_iter grab cgroup_mutex?  cgroup_mutex nests
> > outside cgroup_threadgroup_rwsem or most other mutexes for that matter
> > and isn't exposed from cgroup core.
> > 
> 
> I based my theory on the code
> 
> mem_cgroup_iter -> css_next_descendant_pre which asserts
> 
> cgroup_assert_mutex_or_rcu_locked(), 
> 
> although you are right, we hold RCU lock while calling css_* routines.

That's "or".  The iterator can be called either with RCU lock or
cgroup_mutex.  cgroup core may use it under cgroup_mutex.  Everyone
else uses it with rcu.

Thanks.

-- 
tejun

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]