Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5883457ybv; Tue, 18 Feb 2020 05:52:43 -0800 (PST) X-Google-Smtp-Source: APXvYqyYSpIyAHFYHzjxiQPgHmmRSYyDdyf7hPHhOBUJ39NILTFPWPdeaha5TCFO/JVCGyJic4Mm X-Received: by 2002:aca:c1c2:: with SMTP id r185mr1323854oif.19.1582033963107; Tue, 18 Feb 2020 05:52:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582033963; cv=none; d=google.com; s=arc-20160816; b=VjYb/30WBmw4LrlGsmav9kFaSX1aNoCfm1fhRIAR+bNJ+gmR4fX47IwOn0akDRQXxx vhXyTpmFFvyK1nmNkOTEb9gjQ25BLggunLY0dOXhrKM79W992KciwAZRbF5JqjZ8nvgn URXJTLeiVhZSuHbnR0fIml1AdL5WpB8+Xi4jNwjG20EJ/Wx50qX5sav0su8NI4FTTPon jJ2nu3F7OqbvpIGZM0bK6PBjR80mfjpMNbCoa1S4Gk1Q9mxlnlX+MK+unPJbIzP/tpM9 XktO8uViMJvkAFtIZshuTBoFeDwrXwfhofpSGP6M4rFDOa84ESNo5sFuyMIRIjDq16MB za/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=SDUbyJQHhPdVd+m0OwZiufJe52AxYQKWFV9hmHgw+aE=; b=V6P4Xe/GZyt/lnHtWnOCmGi7AnaE3HWOrPu5WkiLtiIUFBO3j9rb2Nh7blA8S21J8x sPh8Rs6wUKDlsfRJOViHdJld+AoGeRPQWjxEuaYdSP+41yRuHUlXn16ZzN0o/nCDGSIX suY1ayf1ScJV6YfIT/M0K+NUNLVUVoqlj/VJZLIGZ4J5vjj03oYy5sw/8Z0SeS/ONwFw aiscXL1CHB0tpf/oceHFxxO5c1492yxzxj/x59EMbpUGrEzfbaP3JrLFEUBTsY7QacIK sZv501Kb0MxWYHh2TJbYr7TRFY8iWpsONIEZoOfFo8dSofRnk1CRIa3QPIMXF+EDWEBA oM8g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j18si7603347oii.42.2020.02.18.05.52.30; Tue, 18 Feb 2020 05:52:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726705AbgBRNvL (ORCPT + 99 others); Tue, 18 Feb 2020 08:51:11 -0500 Received: from mx2.suse.de ([195.135.220.15]:43334 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726475AbgBRNvL (ORCPT ); Tue, 18 Feb 2020 08:51:11 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id F07D0BC9D; Tue, 18 Feb 2020 13:51:03 +0000 (UTC) Date: Tue, 18 Feb 2020 13:50:59 +0000 From: Mel Gorman To: Dietmar Eggemann Cc: Vincent Guittot , mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, rostedt@goodmis.org, bsegall@google.com, linux-kernel@vger.kernel.org, pauld@redhat.com, parth@linux.ibm.com, valentin.schneider@arm.com, hdanton@sina.com Subject: Re: [PATCH v2 2/5] sched/numa: Replace runnable_load_avg by load_avg Message-ID: <20200218135059.GE3420@suse.de> References: <20200214152729.6059-1-vincent.guittot@linaro.org> <20200214152729.6059-3-vincent.guittot@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 18, 2020 at 01:37:45PM +0100, Dietmar Eggemann wrote: > On 14/02/2020 16:27, Vincent Guittot wrote: > > [...] > > > /* > > * The load is corrected for the CPU capacity available on each node. > > * > > @@ -1788,10 +1831,10 @@ static int task_numa_migrate(struct task_struct *p) > > dist = env.dist = node_distance(env.src_nid, env.dst_nid); > > taskweight = task_weight(p, env.src_nid, dist); > > groupweight = group_weight(p, env.src_nid, dist); > > - update_numa_stats(&env.src_stats, env.src_nid); > > + update_numa_stats(&env, &env.src_stats, env.src_nid); > > This looks strange. Can you do: > > -static void update_numa_stats(struct task_numa_env *env, > +static void update_numa_stats(unsigned int imbalance_pct, > struct numa_stats *ns, int nid) > > - update_numa_stats(&env, &env.src_stats, env.src_nid); > + update_numa_stats(env.imbalance_pct, &env.src_stats, env.src_nid); > You'd also have to pass in env->p and while it could be done, I do not think its worthwhile. > [...] > > > +static unsigned long cpu_runnable_load(struct rq *rq) > > +{ > > + return cfs_rq_runnable_load_avg(&rq->cfs); > > +} > > + > > Why not remove cpu_runnable_load() in this patch rather moving it? > > kernel/sched/fair.c:5492:22: warning: ???cpu_runnable_load??? defined but > not used [-Wunused-function] > static unsigned long cpu_runnable_load(struct rq *rq) > I took the liberty of addressing that when I picked up Vincent's patches for "Reconcile NUMA balancing decisions with the load balancer v3" to fix a build warning. I did not highlight it when I posted because it was such a trivial change. -- Mel Gorman SUSE Labs