Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753206Ab2E2N5a (ORCPT ); Tue, 29 May 2012 09:57:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:6275 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752102Ab2E2N53 (ORCPT ); Tue, 29 May 2012 09:57:29 -0400 Message-ID: <4FC4D513.7010700@redhat.com> Date: Tue, 29 May 2012 09:54:27 -0400 From: Rik van Riel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 MIME-Version: 1.0 To: Peter Zijlstra CC: Andrea Arcangeli , 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 , Johannes Weiner , Srivatsa Vaddagiri , Christoph Lameter Subject: Re: [PATCH 12/35] autonuma: CPU follow memory algorithm References: <1337965359-29725-1-git-send-email-aarcange@redhat.com> <1337965359-29725-13-git-send-email-aarcange@redhat.com> <1338296453.26856.68.camel@twins> In-Reply-To: <1338296453.26856.68.camel@twins> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1367 Lines: 53 On 05/29/2012 09:00 AM, Peter Zijlstra wrote: > On Fri, 2012-05-25 at 19:02 +0200, Andrea Arcangeli wrote: >> @@ -3274,6 +3268,8 @@ need_resched: >> >> post_schedule(rq); >> >> + sched_autonuma_balance(); >> + >> sched_preempt_enable_no_resched(); >> if (need_resched()) >> goto need_resched; > > > >> +void sched_autonuma_balance(void) >> +{ > >> + for_each_online_node(nid) { >> + } > >> + for_each_online_node(nid) { >> + for_each_cpu_and(cpu, cpumask_of_node(nid), allowed) { > > >> + } >> + } > >> + stop_one_cpu(this_cpu, migration_cpu_stop,&arg); >> +} > > NAK > > You do _NOT_ put a O(nr_cpus) or even O(nr_nodes) loop in the middle of > schedule(). > > I see you've made it conditional, but schedule() taking that long -- > even occasionally -- is just not cool. > > schedule() calling schedule() is also an absolute abomination. > > You were told to fix this several times.. Do you have any suggestions for how Andrea could fix this? Pairwise comparisons with a busy CPU/node? -- All rights reversed -- 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/