From nobody Wed Mar 2 11:12:06 2022 X-Original-To: freebsd-arch@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B12AC19EFF26 for ; Wed, 2 Mar 2022 11:12:27 +0000 (UTC) (envelope-from Alexander@leidinger.net) Received: from mailgate.Leidinger.net (bastille.leidinger.net [89.238.82.207]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (P-256) client-digest SHA256) (Client CN "mailgate.leidinger.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4K7s0B6m9vz4kCm; Wed, 2 Mar 2022 11:12:26 +0000 (UTC) (envelope-from Alexander@leidinger.net) Received: from outgoing.leidinger.net (p5b165562.dip0.t-ipconnect.de [91.22.85.98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-256) client-signature ECDSA (P-256)) (Client CN "outgoing.leidinger.net", Issuer "R3" (verified OK)) by mailgate.Leidinger.net (Postfix) with ESMTPSA id A18AE23C6E; Wed, 2 Mar 2022 12:12:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leidinger.net; s=outgoing-alex; t=1646219544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=mY/yQZkZUy75coLQ12M+t0NKYHYFRhA4cEjmhG5yFzw=; b=BzwM0Aorjn2qWLQq+BXsVscTNnHmz/GqG8AJEEDDYGhEGEarFErz06N7bvhTfLa0mTTT/Y XhubnbKovngaiLhFGxO7JxazMyW5VPsWxIo/KqjYS3xiym7ZkAOSRGx96/m9qLIyPU55cg 1totDfWaDTTns6CM7dirvOMOz0oTUloCYYYey+Um9zuwivoem5JH+uPsRGSQZDWJk92mi6 Rgi8yDTrIaurid9Aa3p78h1dPOEiq/c/qcxwR08FwRq132+PsxSgMz45yWC6Z5YyWmTBYI t16G9RYdsabVfQRPbK18zdf0UA1QfkezS/JDGLq229IVUeUA+8+4OUU/CUMFUQ== Received: from webmail.leidinger.net (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (Client did not present a certificate) by outgoing.leidinger.net (Postfix) with ESMTPS id A845EA684; Wed, 2 Mar 2022 12:12:06 +0100 (CET) Date: Wed, 02 Mar 2022 12:12:06 +0100 Message-ID: <20220302121206.Horde.NKFkA1iMzx7Q3sIoiU3Gkrw@webmail.leidinger.net> From: Alexander Leidinger To: Daniel Ebdrup Jensen Cc: freebsd-arch@freebsd.org Subject: Re: support for asymmetric CPUs References: <202203011904.221J4Yg8032167@mail.karels.net> <20220302073638.o7qgisnbbixo6ezh@geroi.local> In-Reply-To: <20220302073638.o7qgisnbbixo6ezh@geroi.local> Accept-Language: de,en Content-Type: multipart/signed; boundary="=_CYpbMvSfKQ4eUIKrPlyXljl"; protocol="application/pgp-signature"; micalg=pgp-sha256 List-Id: Discussion related to FreeBSD architecture List-Archive: https://lists.freebsd.org/archives/freebsd-arch List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arch@freebsd.org MIME-Version: 1.0 X-Rspamd-Queue-Id: 4K7s0B6m9vz4kCm X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=leidinger.net header.s=outgoing-alex header.b=BzwM0Aor; dmarc=pass (policy=quarantine) header.from=leidinger.net; spf=pass (mx1.freebsd.org: domain of Alexander@leidinger.net designates 89.238.82.207 as permitted sender) smtp.mailfrom=Alexander@leidinger.net X-Spamd-Result: default: False [-6.09 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[leidinger.net:s=outgoing-alex]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; MID_RHS_MATCH_FROMTLD(0.00)[]; DKIM_TRACE(0.00)[leidinger.net:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[leidinger.net,quarantine]; NEURAL_HAM_SHORT(-0.99)[-0.985]; MLMMJ_DEST(0.00)[freebsd-arch]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:34240, ipnet:89.238.64.0/18, country:DE]; RCVD_TLS_ALL(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[91.22.85.98:received] X-ThisMailContainsUnwantedMimeParts: N This message is in MIME format and has been PGP signed. --=_CYpbMvSfKQ4eUIKrPlyXljl Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Quoting Daniel Ebdrup Jensen (from Wed, 2 Mar=20=20 2022=2008:36:38 +0100): > The existence of cores which are meant for energy-efficient use > implies that the scheduler can keep track of when something is > energy-efficient, which in turn means that in an ideal world the > programmer would give the compiler some kind of hints, there's some > information that lets the scheduler know if something will use less > energy if it's run on a faster processor vs taking longer on a > slower one, and/or that there's some other magic trick that'll make > this sort of thing work without adding potentially thousands of > lines of heuristics to our scheduler [1] which won't necessarily > make it faster than another scheduler [2] which has almost an order > of magnitude more lines but isn't any faster and can be slower in > certain use-cases [3]. I had a look at [3]... looks like experiments in terms of migrating=20=20 more=20than one thread at once may be interesting (4 minutes to=20=20 distribute=20512 threads from one core to all 32 cores), no matter if=20=20 mixed=20perf cores are a good idea or not. The first question I have for this case is: is this an artificial case=20= =20 (the=20authors limited all threads to one cpu via cpuset and then opened=20= =20 up=20to all cpus to measure the time to get to a balanced state) which=20= =20 can=20not happen in the wild with a "normal" workload (postfix / apache=20= =20 /=20nginx / mysql / ...) except you play around with cpusets? In case someone with some ULE-knowledge reads this: Do I read our code correctly if I say replacing CPU_CLR(high, &hmask); CPU_COPY(&hmask, &lmask); by CPU_COPY(&hmask, &lmask); CPU_CLR(high, &lmask); in sched_balance_group() would result in migrating more than one=20=20 thread=20away from a given core in an extremely unbalanced case? > 1: https://cgit.freebsd.org/src/tree/sys/kern/sched_ule.c > 2:=20=20 >=20https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree= /kernel/sched/fair.c > 3: https://www.usenix.org/conference/atc18/presentation/bouron Bye, Alexander. --=20 http://www.Leidinger.net=20Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF http://www.FreeBSD.org netchild@FreeBSD.org : PGP 0x8F31830F9F2772BF --=_CYpbMvSfKQ4eUIKrPlyXljl Content-Type: application/pgp-signature Content-Description: Digitale PGP-Signatur Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIzBAABCAAdFiEER9UlYXp1PSd08nWXEg2wmwP42IYFAmIfUQUACgkQEg2wmwP4 2IZC5Q//Wd05meIb/8YE+LwKnwTUlSzszR7KLvLC0iTCfJdCEq3BTbM2ctMwAQTg 1RU7QPUs0lJV2FrwTWW+AG6a71I7eH0BVzv47melrtR5bpD+5JnK7D15Q729Ncj9 pXIY524XrqZ2S1Q2QUvgd9/DmX/drRE1JVC6AXvDSoQc1AKeYMM4RIcgF6Ew932Y NYyUwUj8SEmOshM2hlJzs5uW/XIKz+FTErc0zgkRhb2jR50TfxpxHRSjPwQtkkKJ 41J+9+XLJ+W++cNye/wvV/SMJ8VKqbWJN+bo+DfGAW1Fu0Al0N6/fP6ypb1iAvxZ 9thZRXOnVjk/LAHI1cJnpEumt9m43tQ+ZsHiJw6sN5ZIdhXnIDtGeh2fWW1zYhHe w1uSebNVT7LUS5dMD26Abpw21f/9vZ4lFMrc7Ce+//L3s7ivCC1bWVwRygBhEGbN wnSvfrT1WbW3G7rO7c6Azwmsb1+nzIH/BbVocjBUUgYjsz1pSixGecigKQzkGVQd DU00u6l/dWk2TIhKNGfkZDXI5/6hnzNK+EDMflSJzXmcBmvyjR9AGyl5kMbK/Wt5 vGAp+2uRGdGNQv32ZbEhn5bxXsis3gAMaYGwPlMzEMKqmdvHl2Ed/GaYNR9kXkwa IpPl6IELatFh067MyPIMdl4ZnfK7YZAxIeuCc2Ekyw862JgxG0g= =g1dK -----END PGP SIGNATURE----- --=_CYpbMvSfKQ4eUIKrPlyXljl--