Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5819259ybv; Tue, 18 Feb 2020 04:38:22 -0800 (PST) X-Google-Smtp-Source: APXvYqzFVfkMEIFPuF8yo9mrZ6epjGWFumA8s7/VmZBCpq3s9WNADrLShucu8lbBrA17TzUofANz X-Received: by 2002:a05:6808:218:: with SMTP id l24mr1020159oie.108.1582029502377; Tue, 18 Feb 2020 04:38:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582029502; cv=none; d=google.com; s=arc-20160816; b=tjiJbtdZwH6Uq2ueFSeowfMUvBS3CL1J/BJ3oklU0QWPiO/b1B1eV9mgog2gR37rRN gIyzwOe52/cNrbBVg+a24muy+eKBcQocnGDNN/khBJ+BurehAfhjclZkbCluOnCxAQpC gzMtQfKsdP/rldcmf2Zvj5RHCA2n08z23R3gnEJx5RaBFgKvbr/U/fFpM/7dTOv5MpTD 4CPqmN1pHFrX/rrHvnPocsyKm8JDpmhIz8Je9L9gagwgl4Xx4VRCyyjY2tqQ1scZrIPz vqX8Win7wNWnB4pgnALSlwsZuLy9tAwAgc4so1w79uw/EiSci9orGN9Z0Fc0gUeLZIsV 2kdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=G9YSNG458zNJjjWzJuVABHbjGAQhlguoOPPOAn12ZuI=; b=1KAEekD+s3m7LcFF3HavWCWtMpMd2+T5/Rohy74pjn1/0Wlf7LT51rQttwiVi9DAF1 BYIrWDE+w7p+syE5BSGodJg/zU/KkHslHmKS1Jn7mxtf0NrE74Z4uxDsdGMfMzNQ9wD9 h746v3sZR5eqGfjHeffN4n2WwYRc1mnVJhiVqzvUQ2PRM9+mZbdj9rByOKXLM/GlzM+a vp+WoUMiXNcMCr/RYh2MFIb0Cr4DALKaMW6mHjC3c5+dF9V/ExaKeB9SSiFDk7QqZD+g SzzZj6Qr8gE++0/59Kv6EC9ZNk6s4VLoC8OA3OqHp/DNNqsBZMk0aWqD6WIPEOCaegq4 fNrA== 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 b25si1783238otf.151.2020.02.18.04.38.08; Tue, 18 Feb 2020 04:38:22 -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 S1726528AbgBRMh7 (ORCPT + 99 others); Tue, 18 Feb 2020 07:37:59 -0500 Received: from foss.arm.com ([217.140.110.172]:51322 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726363AbgBRMh7 (ORCPT ); Tue, 18 Feb 2020 07:37:59 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6DB051FB; Tue, 18 Feb 2020 04:37:58 -0800 (PST) Received: from [192.168.0.7] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A1A6B3F6CF; Tue, 18 Feb 2020 04:37:56 -0800 (PST) Subject: Re: [PATCH v2 2/5] sched/numa: Replace runnable_load_avg by load_avg To: Vincent Guittot , mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, linux-kernel@vger.kernel.org Cc: pauld@redhat.com, parth@linux.ibm.com, valentin.schneider@arm.com, hdanton@sina.com References: <20200214152729.6059-1-vincent.guittot@linaro.org> <20200214152729.6059-3-vincent.guittot@linaro.org> From: Dietmar Eggemann Message-ID: Date: Tue, 18 Feb 2020 13:37:45 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200214152729.6059-3-vincent.guittot@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); [...] > +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)