Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp21659686ybl; Mon, 6 Jan 2020 08:46:08 -0800 (PST) X-Google-Smtp-Source: APXvYqyBQQLhi9PiASqHk1MABhO3EHCPGGpD0M9UiMBtvbn2WfYoXHyc1kTZlk2JdkC2R8+1GFeA X-Received: by 2002:a9d:4b05:: with SMTP id q5mr99734383otf.174.1578329168696; Mon, 06 Jan 2020 08:46:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578329168; cv=none; d=google.com; s=arc-20160816; b=GpZNUo8AmYnK0YJiQvCsG55HL+F0AHOzsOYX5e/g72X1hmGb96ldDW382huun4yFgR ijQKJmbenC19wtXio+dtq+nm1K0tTzuzvxHtnp5jCcjK9UNtTONB4ypA1gOWKXSYZYMX Cw3wDug4ewlUXKAjepT3nszMwkVVJutbd8RME+3XyFMDsHCjpfxtWZXmKpIqYmNjaW9e ornAjht9XLrjVeJN2/q4DCGXPI1sOiO2ilNj8OO//n4aiq2IwQoOE87hmwiXssKxfgIc zMbcCFz7sI2QZfOg7t5PCK23fcQ0GSCoRaXQvgOTJKp5YeHqH2VcDEX2/Ox/Gg0nTXYB +loQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:date:cc:to:from:subject:message-id; bh=Pau43fNCdaFj18tv66B6zj7BvAy/zvoqRn/cdpZRyXg=; b=aG8P3kT4dkkeLdeVCtdDau1z/QEd364Lms/FdytcRp2uxQVVyRgymtn0r/ZMCzNnJI nfi5P2Lbd2e1pAKDKHBUVnSkEobjDqIwpC9lUmGKVNnUd5FaGYfAFtPyDcAjECvAynM1 lY236BOCpTan/+p/KGUP9FmQPIfPf3vjv73KlL8SXKVdL8nxsIdWudMTL1UJ7Uw3uxvy cPwjiw+donKLco53YXyhapE+gSuI17WsEZCJnrvI2Q3QeuatJi8DT1RDTgjwrnWsELCd +PLqNzp17psmixu/aPZBtwE04WOzUy23SiOeST3jkRknQxkhO47XvObgDe57k4rHDyOS uPaA== 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 c12si1677818otn.90.2020.01.06.08.45.55; Mon, 06 Jan 2020 08:46:08 -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 S1726569AbgAFQpJ (ORCPT + 99 others); Mon, 6 Jan 2020 11:45:09 -0500 Received: from shelob.surriel.com ([96.67.55.147]:39924 "EHLO shelob.surriel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726448AbgAFQpJ (ORCPT ); Mon, 6 Jan 2020 11:45:09 -0500 Received: from imladris.surriel.com ([96.67.55.152]) by shelob.surriel.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) (envelope-from ) id 1ioVUw-0005LM-18; Mon, 06 Jan 2020 11:44:58 -0500 Message-ID: <03ad3a0a1d8e84c12ad958e291040a32a49c9f0f.camel@surriel.com> Subject: Re: [PATCH] sched, fair: Allow a small load imbalance between low utilisation SD_NUMA domains v3 From: Rik van Riel To: Mel Gorman 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 Date: Mon, 06 Jan 2020 11:44:57 -0500 In-Reply-To: <20200106163303.GC3466@techsingularity.net> References: <20200106144250.GA3466@techsingularity.net> <04033a63f11a9c59ebd2b099355915e4e889b772.camel@surriel.com> <20200106163303.GC3466@techsingularity.net> Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-sPn5r1noHxTQZJxPt3V5" User-Agent: Evolution 3.34.2 (3.34.2-1.fc31) MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-sPn5r1noHxTQZJxPt3V5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 2020-01-06 at 16:33 +0000, Mel Gorman wrote: > On Mon, Jan 06, 2020 at 10:47:18AM -0500, Rik van Riel wrote: > > > + imbalance_adj =3D (100 / (env->sd->imbalance_pct > > > - 100)) - 1; > > > + > > > + /* > > > + * Allow small imbalances when the busiest > > > group has > > > + * low utilisation. > > > + */ > > > + imbalance_max =3D imbalance_adj << 1; > > > + if (busiest->sum_nr_running < imbalance_max) > > > + env->imbalance -=3D min(env->imbalance, > > > imbalance_adj); > > > + } > > > + > >=20 > > 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? > >=20 >=20 > It's not directly related to the number of CPUs in the node. Are you > thinking of busiest->group_weight? I am, because as it is right now that if condition looks like it might never be true for imbalance_pct 115. Presumably you put that check there for a reason, and would like it to trigger when the amount by which a node is busy is less than 2 * (imbalance_pct - 100). --=20 All Rights Reversed. --=-sPn5r1noHxTQZJxPt3V5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEKR73pCCtJ5Xj3yADznnekoTE3oMFAl4TZAkACgkQznnekoTE 3oMU3ggAqglhu6aXyxYNartxLHIT5xSm8cCf4hEGUUYU8yUG1Ti+Q5XLV3LHltMa k9YkG32W+H2zlnatDY8FCmZ/lxoF+R/6ZcoXIlTQhY8s6mbbv92lEqQxeyorX7P2 vwzRGz/gaEfOv5/CSoJu2wkNgyZ5r2gMxMDqRKYoevxg87XzNqrcy1D2YiNMqcH6 gFYc2PKSiT4krfuLPNMANLZp63vQnD0Nu6m4m4Z4GsiuaYqbJyU1GJWVQfihYZUc v+mhzKopJtcShkj1SNwdNvZWpyA7wbpucNEleO/vx93hxG4TARgS7a6HL34i6HS1 LqkKwTetbXPkAwFX8dUcCDGfNUwy0g== =OwY9 -----END PGP SIGNATURE----- --=-sPn5r1noHxTQZJxPt3V5--