From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755517AbZLWMU7 (ORCPT ); Wed, 23 Dec 2009 07:20:59 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755413AbZLWMU6 (ORCPT ); Wed, 23 Dec 2009 07:20:58 -0500 Received: from casper.infradead.org ([85.118.1.10]:43684 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753046AbZLWMU6 (ORCPT ); Wed, 23 Dec 2009 07:20:58 -0500 Subject: Re: SCHED: Is task migration necessary in sched_exec(). From: Peter Zijlstra To: Rakib Mullick Cc: Ingo Molnar , LKML In-Reply-To: References: <1261563687.4937.120.camel@laptop> <1261565584.4937.124.camel@laptop> <1261569112.4937.135.camel@laptop> Content-Type: text/plain; charset="UTF-8" Date: Wed, 23 Dec 2009 13:20:34 +0100 Message-ID: <1261570834.4937.141.camel@laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2009-12-23 at 18:04 +0600, Rakib Mullick wrote: > On 12/23/09, Peter Zijlstra wrote: > > On Wed, 2009-12-23 at 17:35 +0600, Rakib Mullick wrote: > > > Do you have a particular workload you worry about or are you merely > > trying to satisfy your curiosity? > > > No, I don't have any particular workload. Anyway, look at it this way, suppose you have 4 tasks on 2 cpus, cpu0 has 3 tasks and cpu1 has 1 task. The currently running task on cpu0 does exec and gets moved to cpu1, even though it gives up time on cpu0, it gains time on cpu1. Because it was eligible to 1/3 of cpu0's time, whereas it is eligible to 1/2 of cpu1's time. So its a win, right?