Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5909381ybv; Tue, 18 Feb 2020 06:18:57 -0800 (PST) X-Google-Smtp-Source: APXvYqyrA357lz05RZRlLFYLJ+qTm7tojVbwFB9uBehBjVQmDmM9FZ38HgwWgj5/iBT5hMubMxtQ X-Received: by 2002:a9d:3e43:: with SMTP id h3mr15182946otg.84.1582035537244; Tue, 18 Feb 2020 06:18:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582035537; cv=none; d=google.com; s=arc-20160816; b=AtU9IZjcAffefywTLVL/PgcoB0pEJw41tPXUkYYAnsAYdT2JJxdyTKpmn07mA+ZvAX /3cUqcBgW9AyCytY9aKe7a63XfQVre0+IYxJEFUp3/uokMz/buFYRY61dA+EbHikdcf/ +oNAv4VAVMNBUq+NnwYVnyjt3hoHtNz+Zh/dIxhisSM/DDSTTaZWX9pGiY/hrsp+NIDr o6Xyv1OkJdcfdwW5PXPHx9UD6WF4omOm8dqSNlHymWzZdjcQgAWWUFNMAHy03TBHLH5u 9QWuzqLGiFi4J2orBy6PVAPcovpV18KyjY5k6F0j1jnN1LmTcY9D03qloDoTKNRr3im9 GLlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=bcfw/WtwA7TkxKO8UeI2AZjb5CE4kKKsLOYA3/v/NYk=; b=yRGkQ2mIzBXxO4V8tSUsPGg40rgXRSAvHM4hKPKuuTBBMpPwaRCfxD6N3g4dxYZzfc jDFmqzy/L+H8IeCzA0GWq3wE5b3qod1vwLsSXMCrh1ioSGZhl/4GMI7q8e0bj548C+vt /Nd5KLES2D7aID/IYMltG/L4hh9K4yL14A+l9cGbE+9uhQNk2h8sCTUq0Mn1MMbl6oqv Gcvw5EmNwWCexiuHFK8tW9b08nR/o/hEpSAaU38BrMOQusTinlivtwlN9J/IkdaMMdAT ToR+C/+Z53Shj83UgT+nQmTa2rp/egwVO+gCT3PBMGBt16TC2IV0wRG6pHlJ8wcB4Bsv r8xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=y0R0X22d; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a124si7531905oii.138.2020.02.18.06.18.44; Tue, 18 Feb 2020 06:18:57 -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; dkim=pass header.i=@linaro.org header.s=google header.b=y0R0X22d; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726645AbgBRORW (ORCPT + 99 others); Tue, 18 Feb 2020 09:17:22 -0500 Received: from mail-lf1-f65.google.com ([209.85.167.65]:35032 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726445AbgBRORV (ORCPT ); Tue, 18 Feb 2020 09:17:21 -0500 Received: by mail-lf1-f65.google.com with SMTP id z18so14647100lfe.2 for ; Tue, 18 Feb 2020 06:17:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bcfw/WtwA7TkxKO8UeI2AZjb5CE4kKKsLOYA3/v/NYk=; b=y0R0X22df9E5JDDebI/9+dhuUi+bCGARz+i3v9UCdAhzDaXbHdRNxwb6JV8PhHO0QC Z2ZXb4yvZ+JMqwsdcwSk/UeEh3UPWQuLo8Q4yzKNIcOGPD3HzC593vmoYsP4UP+TcvaG OZ4I4gpTv077Xf7SZspcYtnivCbQXGd/M4i++NPG0eM2KqjywO/ZNS7eoZoWLyhx/cCa XkbqLx7AnNVJvPv9aZKa5FEcnROzYKbOCh5nO/Arlb6EE9i8rzb0TPNh8zCJl9QfB1Fo idU3bZirDKoJc1qk3OZNRkpeYSRKl4SIKeVv4ty3blHsqWOG+CTI67LLvIvZHMZzgi6k LYrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bcfw/WtwA7TkxKO8UeI2AZjb5CE4kKKsLOYA3/v/NYk=; b=UwA0giGMRlv16fn7OM+fPfYyoJ046zlPP8607uYHl2mFBZyc9RYpNb2gUUZjmSDxyh XET6ZELNavraF2gDA1u66omWVe5fnR8PF1AYP39pLceeW1ucLFi37ASpvOxImuffrekU Lpv4pYKg+P693N5YmVVEPVp3yOk4S5Qao/4W8SNYeeM6t0Ue7UvCb+IBATfQJbLtN9L9 O9PdhvWdrGZAXl5jT4bp+nuSKxPubP8KjcupNVY+M4MLGvP5RQ+/qxsCFrNyMB+PESBN gRpX9GwufQdBsEHtlFxWYrH71XFZcROXM7/qTvtsawjsmxsMq2J9tAre2RtSKRqstWZY ov4g== X-Gm-Message-State: APjAAAW4z3pXIfqhCzEMcytMlWEamOKzSLbFkj3phtj7agNZvGgeRA3O cuZjUHoikBVD5KcI47SGKEVs7zqHmkCzv6B06UGhNg== X-Received: by 2002:ac2:5e9b:: with SMTP id b27mr10933970lfq.184.1582035439659; Tue, 18 Feb 2020 06:17:19 -0800 (PST) MIME-Version: 1.0 References: <20200214152729.6059-1-vincent.guittot@linaro.org> <20200214152729.6059-3-vincent.guittot@linaro.org> <20200218135059.GE3420@suse.de> In-Reply-To: <20200218135059.GE3420@suse.de> From: Vincent Guittot Date: Tue, 18 Feb 2020 15:17:08 +0100 Message-ID: Subject: Re: [PATCH v2 2/5] sched/numa: Replace runnable_load_avg by load_avg To: Mel Gorman Cc: Dietmar Eggemann , Ingo Molnar , Peter Zijlstra , Juri Lelli , Steven Rostedt , Ben Segall , linux-kernel , Phil Auld , Parth Shah , Valentin Schneider , Hillf Danton Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 18 Feb 2020 at 14:51, Mel Gorman wrote: > > 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. I agree > > > [...] > > > > > +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. yes I have noticed that. Thanks > > -- > Mel Gorman > SUSE Labs