Path: csiph.com!aioe.org!news.servidellagleba.it!bofh.it!news.nic.it!robomod From: Peter Zijlstra Newsgroups: linux.kernel Subject: Re: [RFC v5 9/9] sched/deadline: also reclaim bandwidth not used by dl tasks Date: Mon, 27 Mar 2017 16:10:02 +0200 Message-ID: References: X-Original-To: luca abeni Dkim-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=1XEpdN52gVo71qdnTHy2SUeOG51biKtChdJcq04wa0Q=; b=hvmCTUKMoioHjzCrmPuoht1TS +0Bh2X8xNYTMJ4oTtOuyVCN9xcX1P0ktNuL7mVt/KyEMR/RzPNbZHuj1Adb+nIJalzDeRSu0wmr0C ZLiDX5SYzIewT5YGpyw84WSU88WRt/gPtQJPKLT/RZZDFYqsHbFLZXskSb0XHSAkwULrkIxtIdY+O qss/OakO1ynzybfaAPhQt0NTDj1BLAxtQ2BaenwE5oC8jPgWBxAbvE4/eWQzWh7t5TmEYUAKKkmA9 DgNeY0AbS4ym38hy4GECQk3f2/jrXbcVW0AAo4C7lXMqjCMMFYdraRQXWmJmIK2fS0qTCShgJLKHu e0cdxjHrA==; MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: NeoMutt/20170113 (1.7.2) Sender: robomod@news.nic.it List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Approved: robomod@news.nic.it Lines: 27 Organization: linux.* mail to news gateway X-Original-Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Juri Lelli , Claudio Scordino , Steven Rostedt , Tommaso Cucinotta , Daniel Bristot de Oliveira , Joel Fernandes , Mathieu Poirier X-Original-Date: Mon, 27 Mar 2017 16:03:41 +0200 X-Original-Message-ID: <20170327140341.yvjjr6hbow2jug3t@hirez.programming.kicks-ass.net> X-Original-References: <1490327582-4376-1-git-send-email-luca.abeni@santannapisa.it> <1490327582-4376-10-git-send-email-luca.abeni@santannapisa.it> X-Original-Sender: linux-kernel-owner@vger.kernel.org Xref: csiph.com linux.kernel:1609864 On Fri, Mar 24, 2017 at 04:53:02AM +0100, luca abeni wrote: > +static inline > +void __dl_update(struct dl_bw *dl_b, s64 bw) > +{ > + struct root_domain *rd = container_of(dl_b, struct root_domain, dl_bw); > + int i; > + > + RCU_LOCKDEP_WARN(!rcu_read_lock_sched_held(), > + "sched RCU must be held"); > + for_each_cpu_and(i, rd->span, cpu_active_mask) { > + struct rq *rq = cpu_rq(i); > + > + rq->dl.extra_bw += bw; > + } So this is unfortunate (and we already have one such instance). It effectively does an for_each_online_cpu() with IRQs disabled, and on SGI class hardware that takes _forever_. This is also what I got stuck on trying to rewrite AC to use Tommaso's recoverable thing. In the end I had to do a 2 stage try/commit variant. Which ended up being a pain and I didn't finish. I'm not saying this patch is bad, but this is something we need to thing about.