From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755620AbcBXTSD (ORCPT ); Wed, 24 Feb 2016 14:18:03 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:52833 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752829AbcBXTSB (ORCPT ); Wed, 24 Feb 2016 14:18:01 -0500 Date: Wed, 24 Feb 2016 20:17:52 +0100 From: Peter Zijlstra To: Juri Lelli Cc: Steven Rostedt , luca abeni , linux-kernel@vger.kernel.org, mingo@redhat.com, vincent.guittot@linaro.org, wanpeng.li@hotmail.com Subject: Re: [PATCH 1/2] sched/deadline: add per rq tracking of admitted bandwidth Message-ID: <20160224191752.GD25010@twins.programming.kicks-ass.net> References: <20160210162748.GI11415@e106622-lin> <20160211121257.GL11415@e106622-lin> <20160211132254.1a369fe9@utopia> <20160211122754.GN11415@e106622-lin> <20160211134018.6b15fd68@utopia> <20160211124959.GO11415@e106622-lin> <20160211140545.3c9e6e41@utopia> <20160211092546.5b607147@gandalf.local.home> <20160211171012.GS11415@e106622-lin> <20160212170530.GU6357@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160212170530.GU6357@twins.programming.kicks-ass.net> 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 Fri, Feb 12, 2016 at 06:05:30PM +0100, Peter Zijlstra wrote: > Having two separate means of accounting this also feels more fragile > than one would want. > > Let me think a bit about this. I think there's a fundamental problem that makes the whole notion of per-rq accounting 'impossible'. On hot-unplug we only migrate runnable tasks, all blocked tasks remain on the dead cpu. This would very much include their bandwidth requirements. This means that between a hot-unplug and the moment that _all_ those blocked tasks have ran at least once, the sum of online bandwidth doesn't match and we can get into admission trouble (same for GRUB, which can also use per-rq bw like this). The main problem is that there is no real way to find blocked tasks; currently the only way is to iterate _all_ tasks and filter on task_cpu(). We could of course add a blocked tree/list for deadline tasks, to explicitly keep track of all these; this would allow migrating blocked tasks on hotplug and avoid the real ugly I think. But I've not tried yet.