Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755192Ab1ESBl3 (ORCPT ); Wed, 18 May 2011 21:41:29 -0400 Received: from mail-yw0-f46.google.com ([209.85.213.46]:55498 "EHLO mail-yw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753165Ab1ESBl1 (ORCPT ); Wed, 18 May 2011 21:41:27 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=MTpoNX6y6G9rqiVUEP8Gnyv9WHW+nkqA3FJIcCIlcNQeaP2HcIkiIyjhVMsIQVMWV9 Up6Rw/r6B885FHNlbMTUddbAONPv/7tRsTrMwfMJZDGPeQvWiIsSwla1UcttTD4lj9QU Hdch+2R7lpARxuhdGD5+Tmv7jJ+NS4jczm4Gc= MIME-Version: 1.0 In-Reply-To: References: <20110512120606.GA3639@zhy> <20110518013842.GD23940@home.goodmis.org> <1305725044.26849.11.camel@gandalf.stny.rr.com> Date: Thu, 19 May 2011 09:41:27 +0800 Message-ID: Subject: Re: [PATCH] sched: correct how RT task is picked From: Yong Zhang To: Hillf Danton Cc: Steven Rostedt , LKML , Ingo Molnar , Peter Zijlstra , Mike Galbraith Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1345 Lines: 41 On Wed, May 18, 2011 at 10:46 PM, Hillf Danton wrote: > On Wed, May 18, 2011 at 9:24 PM, Steven Rostedt wrote: >> On Wed, 2011-05-18 at 21:19 +0800, Hillf Danton wrote: >> >>> Hi all >>> >>> The patch is prepared again, in which tests for both cpu and >>> nr_cpus_allowed are dropped. >>> >>> The reason to drop nr_cpus_allowed is to make sure that the >>> returned value is correct for both case that cpu == rq->cpu and >>> case that cpu != rq->cpu. >> >> -ENOPARSE >> >> Why would we pick a task that can't migrate? >> > Hi Steven > > For migration, it is the case that cpu != rq->cpu, and > if cpu is allowed by task's affinity, it is bug that task > could not goto cpu because of nr_cpus_allowed since > the nr_cpus_allowed is computed based on the cpus_allowed mask. But for next_prio(), we just calculate the next highest migratible task for a rq regardless on which cpu that task will run, say we let cpu=rq->cpu to be second parameter of pick_next_highest_task_rt(), IOW, it has the same effect as cpu = -1 Thanks, Yong -- Only stand for myself -- 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/