Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp21648347ybl; Mon, 6 Jan 2020 08:34:11 -0800 (PST) X-Google-Smtp-Source: APXvYqysFfYFps7v0CWhkzhBVCVjujsAfA+zuJKCBsChFDp/Cbu1sqi8vX0zf/Z1WZ0vr3jBnFMY X-Received: by 2002:aca:5303:: with SMTP id h3mr5530528oib.109.1578328450921; Mon, 06 Jan 2020 08:34:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578328450; cv=none; d=google.com; s=arc-20160816; b=HBuU2uTpQuymv4Au8HNRPEHTlqH2PoPF50xS9KP8+sjXn+wCHKHyMU41PeBKI9c/16 vhNOgTXrzbQtfjo4u2hb2WD1OqjBBdQQiiMem83jonk8tJJ3vBvTqP09nkxb435DLpZY qKM6bNwRQDfumsJTZ7JerXhI1YCHbHuJZqyptcnEl0iE5Wi/tw5li3CanlgPk9SHWkGQ hp4li4fVu0wwynEOnY9kVaiQKRQ4ocji1qtpf/dlNhvFJExNWBOffwyI7cmbEAD2M88Q pEKGuyiCRuh5D5VHJ+Yjeaqezc/oq2E8jONmM4dm+tpbBBGmtNMOyf4w+1o8uhq1xRjv yEaw== 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=IenaQYdkpv+XJKlwr6//3qDsHt4tlY1srkfsNRySTKU=; b=JGeGMgKXtwLJNo+WrXAVbi70FSK54pPa274i6gu28u+9DdKOlWSUqZnwKkO6GqkmCl Zz+Q4XeRFQRQWfQgE9gV2ULA44+OVXkI3gEyJosFvKj+Zu4IHDV3hRKQpJxdKq2caKGM +v/rqCWKxP064uqDsXysiF4VyAWPXaPd3z/NgVYu63+L2f1x4AUOqB14cga4cf6f/Gfs o2F5p3G2Incxg0vu1Zr8M6upWfXWZv2vh322vxADVhfTP6azaPGedfpp32lAZIXx3MDg vrhcP9z8BCqBucvsMNpLW/0i8+Ln5nJOZCDNs+8wv/zaaF/BLI2d7LmTk+fWyn0AwD7/ UsrA== 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 c5si31250056oig.75.2020.01.06.08.33.57; Mon, 06 Jan 2020 08:34:10 -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 S1726643AbgAFQdI (ORCPT + 99 others); Mon, 6 Jan 2020 11:33:08 -0500 Received: from outbound-smtp35.blacknight.com ([46.22.139.218]:57440 "EHLO outbound-smtp35.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726448AbgAFQdI (ORCPT ); Mon, 6 Jan 2020 11:33:08 -0500 Received: from mail.blacknight.com (unknown [81.17.254.16]) by outbound-smtp35.blacknight.com (Postfix) with ESMTPS id 5150B18FA for ; Mon, 6 Jan 2020 16:33:06 +0000 (GMT) Received: (qmail 12915 invoked from network); 6 Jan 2020 16:33:06 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.18.57]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 6 Jan 2020 16:33:06 -0000 Date: Mon, 6 Jan 2020 16:33:03 +0000 From: Mel Gorman To: Rik van Riel Cc: Vincent Guittot , Ingo Molnar , Peter Zijlstra , pauld@redhat.com, valentin.schneider@arm.com, srikar@linux.vnet.ibm.com, quentin.perret@arm.com, dietmar.eggemann@arm.com, Morten.Rasmussen@arm.com, hdanton@sina.com, parth@linux.ibm.com, LKML Subject: Re: [PATCH] sched, fair: Allow a small load imbalance between low utilisation SD_NUMA domains v3 Message-ID: <20200106163303.GC3466@techsingularity.net> References: <20200106144250.GA3466@techsingularity.net> <04033a63f11a9c59ebd2b099355915e4e889b772.camel@surriel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <04033a63f11a9c59ebd2b099355915e4e889b772.camel@surriel.com> 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 Mon, Jan 06, 2020 at 10:47:18AM -0500, Rik van Riel wrote: > > + imbalance_adj = (100 / (env->sd->imbalance_pct > > - 100)) - 1; > > + > > + /* > > + * Allow small imbalances when the busiest > > group has > > + * low utilisation. > > + */ > > + imbalance_max = imbalance_adj << 1; > > + if (busiest->sum_nr_running < imbalance_max) > > + env->imbalance -= min(env->imbalance, > > imbalance_adj); > > + } > > + > > Wait, so imbalance_max is a function only of > env->sd->imbalance_pct, and it gets compared > against busiest->sum_nr_running, which is related > to the number of CPUs in the node? > It's not directly related to the number of CPUs in the node. Are you thinking of busiest->group_weight? -- Mel Gorman SUSE Labs