From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yong Zhang Subject: Re: On migrate_disable() and latencies Date: Thu, 28 Jul 2011 15:10:15 +0800 Message-ID: <20110728071015.GA2077@windriver.com> References: <1311329992.27400.23.camel@twins> <20110723003934.GP2382@linux.vnet.ibm.com> <1311582653.2617.49.camel@laptop> <20110725211706.GT2327@linux.vnet.ibm.com> <1311765198.24752.437.camel@twins> <20110727183008.GA2407@linux.vnet.ibm.com> <20110728055043.GA570@windriver.com> Reply-To: Yong Zhang Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Cc: "Paul E. McKenney" , Peter Zijlstra , LKML , linux-rt-users , Ingo Molnar , Carsten Emde , Clark Williams , Kumar Gala , Ralf Baechle , rostedt , Nicholas Mc Guire To: Thomas Gleixner Return-path: Received: from mail-vw0-f52.google.com ([209.85.212.52]:55754 "EHLO mail-vw0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752732Ab1G1HKX (ORCPT ); Thu, 28 Jul 2011 03:10:23 -0400 Content-Disposition: inline In-Reply-To: Sender: linux-rt-users-owner@vger.kernel.org List-ID: On Thu, Jul 28, 2011 at 09:01:23AM +0200, Thomas Gleixner wrote: > We do. Just RT is the only sched class which has a set_cpus_allowed() > callback implemented and want's an update to its rt.nr_cpus_allowed > field. > > if (!p->migrate_disable) { > if (p->sched_class && p->sched_class->set_cpus_allowed) > p->sched_class->set_cpus_allowed(p, new_mask); > p->rt.nr_cpus_allowed = cpumask_weight(new_mask); > } > > The general part is here: > > cpumask_copy(&p->cpus_allowed, new_mask); > > And tsk_cpus_allowed() does: > { > if (p->migrate_disable) > return cpumask_of(task_cpu(p)); > > return &p->cpus_allowed; > } Hmmm, sched-use-task-allowed-accessor.patch is the preparation :) Clear now, thanks Thomas. -Yong -- Only stand for myself