Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933492AbbENPRs (ORCPT ); Thu, 14 May 2015 11:17:48 -0400 Received: from mail-qg0-f43.google.com ([209.85.192.43]:33416 "EHLO mail-qg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933403AbbENPRq (ORCPT ); Thu, 14 May 2015 11:17:46 -0400 Date: Thu, 14 May 2015 11:17:42 -0400 From: Tejun Heo To: Sergey Senozhatsky Cc: lizefan@huawei.com, cgroups@vger.kernel.org, mingo@redhat.com, peterz@infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] sched, cgroup: reorganize threadgroup locking Message-ID: <20150514151742.GJ11388@htj.duckdns.org> References: <1431549318-16756-1-git-send-email-tj@kernel.org> <1431549318-16756-2-git-send-email-tj@kernel.org> <20150514010913.GA4441@swordfish> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150514010913.GA4441@swordfish> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 804 Lines: 25 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/