Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934172Ab0BYVpX (ORCPT ); Thu, 25 Feb 2010 16:45:23 -0500 Received: from bombadil.infradead.org ([18.85.46.34]:47931 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933999Ab0BYVno (ORCPT ); Thu, 25 Feb 2010 16:43:44 -0500 Subject: Re: [PATCH 2/3] sched: enforce per-cpu utilization limits on runtime balancing From: Peter Zijlstra To: Fabio Checconi Cc: Ingo Molnar , Thomas Gleixner , Paul Turner , Dario Faggioli , Michael Trimarchi , Dhaval Giani , Tommaso Cucinotta , linux-kernel@vger.kernel.org, Fabio Checconi In-Reply-To: <91b76b9b7555024d9afd7264eeae1b2db6a5e74c.1266931410.git.fabio@helm.retis> References: <91b76b9b7555024d9afd7264eeae1b2db6a5e74c.1266931410.git.fabio@helm.retis> Content-Type: text/plain; charset="UTF-8" Date: Thu, 25 Feb 2010 21:28:23 +0100 Message-ID: <1267129703.22519.559.camel@laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.2 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 994 Lines: 31 On Tue, 2010-02-23 at 19:56 +0100, Fabio Checconi wrote: > +#ifdef CONFIG_SMP > +static inline unsigned long rt_init_free_bw(void) > +{ > + unsigned long used = to_ratio(global_rt_period(), global_rt_runtime()); > + > + return to_ratio(RUNTIME_INF, RUNTIME_INF) - used; > +} > +#endif > +static void __rt_restart_balancing(void) > +{ > + unsigned long used, global, free; > + struct rq *rq; > + int i; > + > + used = rt_used_bandwidth(); > + global = to_ratio(RUNTIME_INF, RUNTIME_INF); > + > + free = global - used; We take the max as RUNTIME_INF instead of global_rt_* so that we can move runtime around and fully saturate a single cpu (given there is enough free to compensate on other cpus) ? -- 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/