Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 4 Feb 2003 04:21:35 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 4 Feb 2003 04:21:35 -0500 Received: from ophelia.ess.nec.de ([193.141.139.8]:25731 "EHLO ophelia.hpce.nec.com") by vger.kernel.org with ESMTP id convert rfc822-to-8bit; Tue, 4 Feb 2003 04:21:33 -0500 Content-Type: text/plain; charset=US-ASCII From: Erich Focht To: Ingo Molnar , linux-kernel@vger.kernel.org Subject: Re: [patch] HT scheduler, sched-2.5.59-E2 Date: Tue, 4 Feb 2003 10:31:20 +0100 User-Agent: KMail/1.4.3 Cc: "Martin J. Bligh" , Andrew Theurer , Michael Hohnbaum , Matthew Dobson , Christoph Hellwig , Robert Love , Linus Torvalds , lse-tech , Anton Blanchard , Andrea Arcangeli References: In-Reply-To: MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Message-Id: <200302041031.20394.efocht@ess.nec.de> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1556 Lines: 36 Hi Ingo, On Monday 03 February 2003 19:23, Ingo Molnar wrote: > -#define > CAN_MIGRATE_TASK(p,rq,this_cpu) \ > - ((jiffies - (p)->sleep_timestamp > cache_decay_ticks) && \ > - !task_running(rq, p) && \ > - ((p)->cpus_allowed & (1UL << (this_cpu)))) +#define > CAN_MIGRATE_TASK(p,rq,cpu) \ > + ((idle || (jiffies - (p)->last_run > cache_decay_ticks)) && \ > + !task_running(p) && task_allowed(p, cpu)) at least for NUMA systems this is too aggressive (though I believe normal SMP systems could be hurt, too). The problem: freshly forked tasks are stolen by idle cpus on the same node before they exec. This actually disables the sched_balance_exec() mechanism as the tasks to be balanced already run alone on other CPUs. Which means: the whole benefit of having balanced nodes (maximize the memory bandwidth) is gone. The change below is less aggressive but in the same philosophy. Could you please take it instead? > CAN_MIGRATE_TASK(p,rq,cpu) \ > + ((jiffies - (p)->last_run > (cache_decay_ticks >> idle)) && \ > + !task_running(p) && task_allowed(p, cpu)) Regards, Erich - 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/