Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6047224ybv; Tue, 18 Feb 2020 08:52:50 -0800 (PST) X-Google-Smtp-Source: APXvYqyahzBAE/+Oz+hjMo+WqV1bgsuaHGdA1/N5LKRxFs3iFQmTTqO0m/VEYG0IkXpOjnuQ8Na7 X-Received: by 2002:a9d:7a89:: with SMTP id l9mr15515603otn.228.1582044769959; Tue, 18 Feb 2020 08:52:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582044769; cv=none; d=google.com; s=arc-20160816; b=TDD5u34FzuQGEuebI3k9w2vDkZoAp+TkqARrbyB1r6ldrqseGOB/fV64uJUb0b6V09 wJZ1J+AJhoR3GUmVLwGYf+ymJEfaDiMS0r5+vYefMpUofZAkkyrEHgZ//FxgloGpH/Qi CAJaBdD0lPOLvr8ThpsJLpEBxqwDAWGVeipHI3JNhQ1n+Rw4wY72E1nlxgUiX3BlFNf0 znlurtFVAiYN1evUEqmPtq1No2F0xzPOMOMDbCHc2TM5VQwNhS4j+jg55Zis+tBtWwpe exkMnUyKFt/OpZPgM5g8qHLSqHb+bsiCHCPuiohmmkdz8MYBHi24HIOVCDX3M2z0UCBG h2vA== 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=3BlaUyR3Pra91NGQcr8oo3qcqrZnwSFbyHChQxeniBE=; b=Gsm5Wwg+9iVBvD/yQKtJBjroAH/GOJptYifY42V8S5ZBQTjng+Rn2XJWfMTj7SBcZi pyErOrl/K+a5Zlx6XqCfl32EVM3F6DxtFAn25rR1k81Z0G0TjG0sxEWzHRE2700usJxv sezjwLWFrbW60ACXQYzf6LLT87wwlMhENqAtGunAS7d1D+rx3NCW+EmzQUw3hbXKbvDu B4XY/WLnslKwUHAI1ShYKdw/RfOBeVl2DWXNivTm7dzwNjSaJQYhu1c5oXieuoMd989q 80Ek/2PTIbgIq3lmLCy8rn0+Put091O7UktKf31arBvXyhCUM24u8A0kk/ST5wTwghl6 p0ew== 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 o13si2099946otp.27.2020.02.18.08.52.37; Tue, 18 Feb 2020 08:52:49 -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 S1726750AbgBRQvB (ORCPT + 99 others); Tue, 18 Feb 2020 11:51:01 -0500 Received: from foss.arm.com ([217.140.110.172]:55716 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726655AbgBRQvB (ORCPT ); Tue, 18 Feb 2020 11:51:01 -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 4DB5D30E; Tue, 18 Feb 2020 08:51:00 -0800 (PST) Received: from [10.0.2.15] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7CB1D3F703; Tue, 18 Feb 2020 08:50:58 -0800 (PST) Subject: Re: [PATCH v2 2/5] sched/numa: Replace runnable_load_avg by load_avg To: Mel Gorman Cc: Vincent Guittot , mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, linux-kernel@vger.kernel.org, pauld@redhat.com, parth@linux.ibm.com, hdanton@sina.com References: <20200214152729.6059-1-vincent.guittot@linaro.org> <20200214152729.6059-3-vincent.guittot@linaro.org> <20200218153801.GF3420@suse.de> From: Valentin Schneider Message-ID: Date: Tue, 18 Feb 2020 16:50:48 +0000 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: <20200218153801.GF3420@suse.de> Content-Type: text/plain; charset=iso-8859-15 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 18/02/2020 15:38, Mel Gorman wrote: >> >> Could we reuse group_type instead? The definitions are the same modulo >> s/group/node/. >> > > I kept the naming because there is the remote possibility that NUMA > balancing will deviate in some fashion. Right now, it's harmless. > Since it's just a subset ATM I'd go for the reuse and change that later if shown a split is required, but fair enough. > I didn't merge that part of the first version of my series. I was > waiting to see how the implementation for allowing a small degree of > imbalance looks like. If it's entirely confined in adjust_numa_balance ^^^^^^^^^^^^^^^^^^^ Apologies if that's a newbie question, but I'm not familiar with that one. Would that be added in your reconciliation series? I've only had a brief look at it yet (it's next on the chopping block). > then I'll create the common helper at the same time. For now, I left the > possibility open that numa_classify would use something different than > group_is_overloaded or group_has_capacity even if I find that hard to > imagine at the moment. > >> What I'm naively thinking here is that we could have either move the whole >> thing to just sg_lb_stats (AFAICT the fields of numa_stats are a subset of it), >> or if we really care about the stack we could tweak the ordering to ensure >> we can cast one into the other (not too enticed by that one though). >> > > Yikes, no I'd rather not do that. Basically all I did before was create > a common helper like __lb_has_capacity that only took basic types as > parameters. group_has_capacity and numa_has_capacity were simple wrappers > that read the correct fields from their respective stats structures. > That's more sensible indeed. It'd definitely be nice to actually reconcile the two balancers with these common helpers, though I guess it doesn't *have* to happen with this very patch.