From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [PATCH 3/3] sched: Implement interface for cgroup unified hierarchy Date: Thu, 17 Sep 2015 17:53:32 +0200 Message-ID: <20150917155332.GP3816@twins.programming.kicks-ass.net> References: <20150824213600.GK28944@mtj.duckdns.org> <20150824221935.GN28944@mtj.duckdns.org> <20150825210234.GE26785@mtj.duckdns.org> <20150912144007.GA8942@htj.duckdns.org> <20150917143527.GJ3604@twins.programming.kicks-ass.net> <20150917151049.GB11639@twins.programming.kicks-ass.net> <20150917155245.GF7205@mtj.duckdns.org> Mime-Version: 1.0 Return-path: Content-Disposition: inline In-Reply-To: <20150917155245.GF7205-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Tejun Heo Cc: Paul Turner , Ingo Molnar , Johannes Weiner , lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org, cgroups , LKML , kernel-team , Linus Torvalds , Andrew Morton On Thu, Sep 17, 2015 at 11:52:45AM -0400, Tejun Heo wrote: > Hello, > > On Thu, Sep 17, 2015 at 05:10:49PM +0200, Peter Zijlstra wrote: > > Subject: sched: Refuse to unplug a CPU if this will violate user task affinity > > > > Its bad policy to allow unplugging a CPU for which a user set explicit > > affinity, either strictly on this CPU or in case this was the last > > online CPU in its mask. > > > > Either would end up forcing the thread on a random other CPU, violating > > the sys_sched_setaffinity() constraint. > > Shouldn't this at least handle suspend differently? Otherwise any > userland task would be able to block suspend. It does, it will allow suspend. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752277AbbIQP7F (ORCPT ); Thu, 17 Sep 2015 11:59:05 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:39373 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751973AbbIQP7C (ORCPT ); Thu, 17 Sep 2015 11:59:02 -0400 Date: Thu, 17 Sep 2015 17:53:32 +0200 From: Peter Zijlstra To: Tejun Heo Cc: Paul Turner , Ingo Molnar , Johannes Weiner , lizefan@huawei.com, cgroups , LKML , kernel-team , Linus Torvalds , Andrew Morton Subject: Re: [PATCH 3/3] sched: Implement interface for cgroup unified hierarchy Message-ID: <20150917155332.GP3816@twins.programming.kicks-ass.net> References: <20150824213600.GK28944@mtj.duckdns.org> <20150824221935.GN28944@mtj.duckdns.org> <20150825210234.GE26785@mtj.duckdns.org> <20150912144007.GA8942@htj.duckdns.org> <20150917143527.GJ3604@twins.programming.kicks-ass.net> <20150917151049.GB11639@twins.programming.kicks-ass.net> <20150917155245.GF7205@mtj.duckdns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150917155245.GF7205@mtj.duckdns.org> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 17, 2015 at 11:52:45AM -0400, Tejun Heo wrote: > Hello, > > On Thu, Sep 17, 2015 at 05:10:49PM +0200, Peter Zijlstra wrote: > > Subject: sched: Refuse to unplug a CPU if this will violate user task affinity > > > > Its bad policy to allow unplugging a CPU for which a user set explicit > > affinity, either strictly on this CPU or in case this was the last > > online CPU in its mask. > > > > Either would end up forcing the thread on a random other CPU, violating > > the sys_sched_setaffinity() constraint. > > Shouldn't this at least handle suspend differently? Otherwise any > userland task would be able to block suspend. It does, it will allow suspend.