lkml.org 
[lkml]   [2015]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] sched, cgroup: reorganize threadgroup locking
Hello, Sergey.

On Thu, May 14, 2015 at 10:09:13AM +0900, Sergey Senozhatsky wrote:
> > +static inline void threadgroup_change_begin(struct task_struct *tsk)
> > {
> > - down_write(&tsk->signal->group_rwsem);
> > + might_sleep();
>
> I think cgroup_threadgroup_change_begin()->down_read() already does
> might_sleep() check.

Sure but it's a layering thing. threadgroup_change_begin() should be
called from a blockable context whether the hook users actually make
use of it or not. e.g. We want might_sleep() even when
!CONFIG_CGROUP.

Thanks.

--
tejun


\
 
 \ /
  Last update: 2015-05-14 18:01    [W:0.041 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site