From nobody Tue Nov 22 22:00:14 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 4NGyqZ1kSLz4hjjm for ; Tue, 22 Nov 2022 22:00:26 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Received: from www121.sakura.ne.jp (www121.sakura.ne.jp [153.125.133.21]) (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 did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4NGyqY4HxFz4GV1 for ; Tue, 22 Nov 2022 22:00:25 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Authentication-Results: mx1.freebsd.org; none Received: from kalamity.joker.local (123-1-88-210.area1b.commufa.jp [123.1.88.210]) (authenticated bits=0) by www121.sakura.ne.jp (8.16.1/8.16.1/[SAKURA-WEB]/20201212) with ESMTPA id 2AMM0E5L034973; Wed, 23 Nov 2022 07:00:18 +0900 (JST) (envelope-from junchoon@dec.sakura.ne.jp) Date: Wed, 23 Nov 2022 07:00:14 +0900 From: Tomoaki AOKI To: Hans Petter Selasky Cc: mike tancsa , FreeBSD Current Subject: Re: ULE realtime scheduler advice needed Message-Id: <20221123070014.71f5cc4f1d86cb4d4c0f6bf6@dec.sakura.ne.jp> In-Reply-To: <1a404155-4ca9-4e88-4c40-5407c2ae52a9@selasky.org> References: <7ad10a5e-29d6-aaef-25cf-407d65f056cc@selasky.org> <8d8c4b03-323a-8e4d-44fd-e47749d2fd85@sentex.net> <1a404155-4ca9-4e88-4c40-5407c2ae52a9@selasky.org> Organization: Junchoon corps X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd13.0) 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 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4NGyqY4HxFz4GV1 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:7684, ipnet:153.125.128.0/18, country:JP] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On Tue, 22 Nov 2022 22:38:04 +0100 Hans Petter Selasky wrote: > On 11/22/22 20:28, mike tancsa wrote: > > On 11/17/2022 11:47 PM, Hans Petter Selasky wrote: > >> Hi, > >> > >> I'm doing some work with audio and have noticed some problems with the > >> ULE scheduler. I have a program that generate audio based on > >> key-presses. When no keys are pressed, the load is near 0%, but as > >> soon as you start pressing keys, the load goes maybe to 80% of a CPU > >> core. This program I run with rtprio 8 xxx. The issue I observe or > >> hear actually, is that it takes too long until the scheduler grasps > >> that this program needs it's own CPU core and stops time-sharing the > >> program. When I however use cpuset -l xxx rtprio 8 yyy everything is > >> good, and the program outputs realtime audio in-time. > >> > >> Or is this perhaps a CPU frequency stepping issue? > >> > >> Any advice on where to look? > >> > > A long shot, but I am curious if by chance you have hwpstate_intel for > > your cpu frequency driver. If so, does setting > > dev.hwpstate_intel.0.epp=0 make any difference ? > > > > Yes, I have four of those, set to 50 by default. Let me try. > > --HPS FYI: I habitally run below manually (as root) when I'm on AC powerline. sysctl -aN | fgrep dev.hwpstate | fgrep epp | while read OID ; do ; \ sysctl ${OID}=0 ; done -- Tomoaki AOKI