From nobody Tue Nov 22 19:28:44 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 4NGvSb74Y7z4hNrN for ; Tue, 22 Nov 2022 19:28:47 +0000 (UTC) (envelope-from mike@sentex.net) Received: from smarthost1.sentex.ca (smarthost1.sentex.ca [IPv6:2607:f3e0:0:1::12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smarthost1.sentex.ca", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NGvSb1h2Kz3xvF for ; Tue, 22 Nov 2022 19:28:47 +0000 (UTC) (envelope-from mike@sentex.net) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of mike@sentex.net designates 2607:f3e0:0:1::12 as permitted sender) smtp.mailfrom=mike@sentex.net; dmarc=none Received: from pyroxene2a.sentex.ca (pyroxene19.sentex.ca [199.212.134.19]) by smarthost1.sentex.ca (8.16.1/8.16.1) with ESMTPS id 2AMJSiaU059652 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 22 Nov 2022 14:28:44 -0500 (EST) (envelope-from mike@sentex.net) Received: from [IPV6:2607:f3e0:0:4:bd64:76f:25e7:3d7a] ([IPv6:2607:f3e0:0:4:bd64:76f:25e7:3d7a]) by pyroxene2a.sentex.ca (8.16.1/8.15.2) with ESMTPS id 2AMJShB4092422 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Tue, 22 Nov 2022 14:28:44 -0500 (EST) (envelope-from mike@sentex.net) Message-ID: <8d8c4b03-323a-8e4d-44fd-e47749d2fd85@sentex.net> Date: Tue, 22 Nov 2022 14:28:44 -0500 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 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: ULE realtime scheduler advice needed Content-Language: en-US To: Hans Petter Selasky , FreeBSD Current References: <7ad10a5e-29d6-aaef-25cf-407d65f056cc@selasky.org> From: mike tancsa In-Reply-To: <7ad10a5e-29d6-aaef-25cf-407d65f056cc@selasky.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 64.7.153.18 X-Spamd-Result: default: False [-3.35 / 15.00]; NEURAL_HAM_LONG(-1.00)[-0.999]; NEURAL_HAM_SHORT(-1.00)[-0.999]; NEURAL_HAM_MEDIUM(-0.95)[-0.948]; R_SPF_ALLOW(-0.20)[+ip6:2607:f3e0::/32]; RCVD_IN_DNSWL_LOW(-0.10)[199.212.134.19:received]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_ALL(0.00)[]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; ASN(0.00)[asn:11647, ipnet:2607:f3e0::/32, country:CA]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; TO_DN_ALL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FREEFALL_USER(0.00)[mike]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DMARC_NA(0.00)[sentex.net]; ARC_NA(0.00)[] X-Rspamd-Queue-Id: 4NGvSb1h2Kz3xvF X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N 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 ?     ---Mike