Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754135Ab2E2QM5 (ORCPT ); Tue, 29 May 2012 12:12:57 -0400 Received: from casper.infradead.org ([85.118.1.10]:58158 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752753Ab2E2QM4 convert rfc822-to-8bit (ORCPT ); Tue, 29 May 2012 12:12:56 -0400 Message-ID: <1338307942.26856.111.camel@twins> Subject: Re: [PATCH 22/35] autonuma: sched_set_autonuma_need_balance From: Peter Zijlstra To: Andrea Arcangeli Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Hillf Danton , Dan Smith , Linus Torvalds , Andrew Morton , Thomas Gleixner , Ingo Molnar , Paul Turner , Suresh Siddha , Mike Galbraith , "Paul E. McKenney" , Lai Jiangshan , Bharata B Rao , Lee Schermerhorn , Rik van Riel , Johannes Weiner , Srivatsa Vaddagiri , Christoph Lameter Date: Tue, 29 May 2012 18:12:22 +0200 In-Reply-To: <1337965359-29725-23-git-send-email-aarcange@redhat.com> References: <1337965359-29725-1-git-send-email-aarcange@redhat.com> <1337965359-29725-23-git-send-email-aarcange@redhat.com> Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT X-Mailer: Evolution 3.2.2- Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1262 Lines: 35 On Fri, 2012-05-25 at 19:02 +0200, Andrea Arcangeli wrote: > Invoke autonuma_balance only on the busy CPUs at the same frequency of > the CFS load balance. > > Signed-off-by: Andrea Arcangeli > --- > kernel/sched/fair.c | 3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index 99d1d33..1357938 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -4893,6 +4893,9 @@ static void run_rebalance_domains(struct softirq_action *h) > > rebalance_domains(this_cpu, idle); > > + if (!this_rq->idle_balance) > + sched_set_autonuma_need_balance(); > + This just isn't enough.. the whole thing needs to move out of schedule(). The only time schedule() should ever look at another cpu is if its idle. As it stands load-balance actually takes too much time as it is to live in a softirq, -rt gets around that by pushing all softirqs into a thread and I was thinking of doing some of that for mainline too. -- 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/