From nobody Fri Nov 18 08:18:28 2022 X-Original-To: freebsd-current@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 4ND8nd4lp9z4hpxh for ; Fri, 18 Nov 2022 08:19:01 +0000 (UTC) (envelope-from Alexander@leidinger.net) Received: from mailgate.Leidinger.net (mailgate.leidinger.net [IPv6:2a00:1828:2000:313::1:5]) (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 4ND8nc7466z4Y7k for ; Fri, 18 Nov 2022 08:19:00 +0000 (UTC) (envelope-from Alexander@leidinger.net) Authentication-Results: mx1.freebsd.org; none Received: from outgoing.leidinger.net (p5b165cc5.dip0.t-ipconnect.de [91.22.92.197]) (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 021B3264D5; Fri, 18 Nov 2022 09:18:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leidinger.net; s=outgoing-alex; t=1668759528; 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; bh=c+FO7D/mwO+iDTv1LzBp8iaJQkkMJcprKLYcJVltP1g=; b=xyBreU+VPziL5zIOQkayRp1p19SrTKQTNGisG7gLg6y/okHuH2XEbH3IT+F9VGsIpVurt6 0F5gGt2Q/SJMC8qPzArmTT5S1pKIPZ1Fj5jn2Dui16mCSXdKMfl6gW3ZbXkMYrTmji/g/0 ctfYxLeU7bZpgWga4LKHbqDhWZD/uPCsTc9EM6unETyLJAaIOSH5Hr3ejFGtsMT+hRNigv o+gjjYmxixhtDR3VSF44aUaxZGyEKJNSVQaQFS1wDOjlP1h/exPYz0u93lBmmnwr/SrM0h 0ZnhAfNQDp6wa8NsfLpVhETp+u3YedSYngNwAfihdV6mOOjNLk1WfQcUN19llg== 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 4BD6E587; Fri, 18 Nov 2022 09:18:28 +0100 (CET) Date: Fri, 18 Nov 2022 09:18:28 +0100 Message-ID: <20221118091828.Horde.xkZUBiYzzOgubFonR22tMzm@webmail.leidinger.net> From: Alexander Leidinger To: Hans Petter Selasky Cc: FreeBSD Current Subject: Re: ULE realtime scheduler advice needed In-Reply-To: <7ad10a5e-29d6-aaef-25cf-407d65f056cc@selasky.org> Accept-Language: de,en Content-Type: multipart/signed; boundary="=_tggxlP2Ao4En0EIkGQsAPKT"; protocol="application/pgp-signature"; micalg=pgp-sha256 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 X-Rspamd-Queue-Id: 4ND8nc7466z4Y7k X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:34240, ipnet:2a00:1828::/32, country:DE] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N This message is in MIME format and has been PGP signed. --=_tggxlP2Ao4En0EIkGQsAPKT Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Quoting Hans Petter Selasky (from Fri, 18 Nov 2022=20=20 05:47:58=20+0100): > Hi, > > I'm doing some work with audio and have noticed some problems with=20=20 >=20the ULE scheduler. I have a program that generate audio based on=20=20 >=20key-presses. When no keys are pressed, the load is near 0%, but as=20= =20 >=20soon as you start pressing keys, the load goes maybe to 80% of a CPU=20= =20 >=20core. This program I run with rtprio 8 xxx. The issue I observe or=20= =20 >=20hear actually, is that it takes too long until the scheduler grasps=20= =20 >=20that this program needs it's own CPU core and stops time-sharing the=20= =20 >=20program. When I however use cpuset -l xxx rtprio 8 yyy everything is=20= =20 >=20good, and the program outputs realtime audio in-time. I have something in my mind about ULE not handling idleprio and/or=20=20 rtprio=20correctly, but I have no pointer to a validation of this. > Or is this perhaps a CPU frequency stepping issue? You could play with rc.conf (/etc/rc.d/power_profile): performance_cpu_freq=3D"HIGH" performance_cx_lowest=3D"C3" # see sysctl hw.cpu.0 | grep cx economy_cx_lowest=3D"C3" # see sysctl hw.cpu.0 | grep cx Your system may provide other Cx possibilities, and ging to a lower=20=20 number=20(e.g. C1) means less power-saving but faster response from the=20= =20 CPU=20(I do not expect that this is causing the issue you have). > Any advice on where to look? Potential sysctl to play with to change "interactivity detection" in ULE: https://www.mail-archive.com/freebsd-stable@freebsd.org/msg112118.html Bye, Alexander. --=20 http://www.Leidinger.net=20Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF http://www.FreeBSD.org netchild@FreeBSD.org : PGP 0x8F31830F9F2772BF --=_tggxlP2Ao4En0EIkGQsAPKT Content-Type: application/pgp-signature Content-Description: Digitale PGP-Signatur Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIzBAABCAAdFiEER9UlYXp1PSd08nWXEg2wmwP42IYFAmN3P9MACgkQEg2wmwP4 2Ib46g/+MHdv1DNmg2mSrSzPDxYx79Vz/HFnMMe1wSGf9DOJll6nheyouIypoE+O rZu+Z9dppbNi+hAMnnSbQ5NHSCj2sI7BR/dOJt0B4f5l0SwmNs6Ph28HXQju12pp /Zmh9AtZZwaw2qCXmbA5uEyEJmkIIsqnXMXQ7HDlPKP+b9q7vj/+XqsO/rE2QCK1 RLYlAGvfdZ2vo/gQovE8k5Bfn+8JtizsNm0Pwj7EZCHNLhgA1vU4QKzjCMWScyhx 0OPxuYiIZcgcKQt3rRBs0ivhodjuEc13BzEiFlQJ8/ILdw7QnWNiWYXxuoKtWC7n T/wKmfqvv7zRwWAQt3fE4BcQZw9Z9fAkLQPX1S/vwprHzlhHZ6mJukUNxgj5FVXG dnQ/+gRHi7av8k2ntWSgkKLn3btb2GMjaQBRmcZ+/R+BHxkI/lJV3oEYRLLRA/Bq SoxURWjJQMBiZcoHsjgCnR62TbPXG1YiJ7YfXMLkgT4pZ19ngIjMSgGALkCS8nGb u00HyIJoccrQvytgIBHgdInUFW6rQdIW9hfzQun7rvVNQ1noqxs9khbFiqUATbZF qDWkPP7sF9cn86p/IFn6xIuo2HaiJXzAviGPKTB+jHnJdd2jOPtNdnAW/pdTKT5l SDm64xoUIaFYqfgV7UsbM+gkdondTeRyC90GYdeOeGEd6ySs4Mg= =lrgw -----END PGP SIGNATURE----- --=_tggxlP2Ao4En0EIkGQsAPKT--