Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933442AbcDETf6 (ORCPT ); Tue, 5 Apr 2016 15:35:58 -0400 Received: from mail-wm0-f51.google.com ([74.125.82.51]:35706 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758915AbcDETf5 (ORCPT ); Tue, 5 Apr 2016 15:35:57 -0400 Date: Tue, 5 Apr 2016 21:35:49 +0200 From: luca abeni To: Peter Zijlstra Cc: linux-kernel@vger.kernel.org, Ingo Molnar , Juri Lelli Subject: Re: [RFC v2 3/7] Improve the tracking of active utilisation Message-ID: <20160405213549.244169ca@utopia> In-Reply-To: <20160405180050.GO3408@twins.programming.kicks-ass.net> References: <1459523553-29089-1-git-send-email-luca.abeni@unitn.it> <1459523553-29089-4-git-send-email-luca.abeni@unitn.it> <20160405150036.GA3430@twins.programming.kicks-ass.net> <20160405195657.586e8c97@utopia> <20160405180050.GO3408@twins.programming.kicks-ass.net> X-Mailer: Claws Mail 3.12.0 (GTK+ 2.24.28; i686-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1033 Lines: 36 On Tue, 5 Apr 2016 20:00:50 +0200 Peter Zijlstra wrote: > On Tue, Apr 05, 2016 at 07:56:57PM +0200, luca abeni wrote: > > > > + if (rq != cpu_rq(cpu)) { > > > > > > I don't think this is right, you want: > > > > > > if (task_cpu(p) != cpu) { > > > > > > because @cpu does not need to be task_cpu(). > > Uhm... I must have misunderstood something in the code, then :( > > What I want to do here is to check if select_task_rq_dl() selected > > a new CPU for this task... Since at the beginning of the function > > rq is set as > > rq = cpu_rq(cpu); > > I was thinkint about checking if this is still true (if not, it > > means that the value of "cpu" changed). > > > > I'll look at it again. > > Basically because: > > ac66f5477239 ("sched/numa: Introduce migrate_swap()") Thanks; I am going to look at it Thanks, Luca > > we cannot (in general) assume .cpu == task_cpu(p). > > Now it might still be true for deadline tasks, but I find it easier to > simply not rely on such assumptions.