From nobody Thu Mar 28 19:29:01 2024 X-Original-To: freebsd-questions@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 4V5D9s0hXfz5Fqmm for ; Thu, 28 Mar 2024 19:29:05 +0000 (UTC) (envelope-from steve@copacetic.net) Received: from starlight.copacetic.net (starlight.copacetic.net [166.78.105.238]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4V5D9q73lnz4QKk for ; Thu, 28 Mar 2024 19:29:03 +0000 (UTC) (envelope-from steve@copacetic.net) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of steve@copacetic.net designates 166.78.105.238 as permitted sender) smtp.mailfrom=steve@copacetic.net Received: from [172.16.200.151] (unknown [73.149.127.197]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by starlight.copacetic.net (Postfix) with ESMTPSA id 6FB3B12C001 for ; Thu, 28 Mar 2024 19:29:02 +0000 (UTC) Message-ID: <5f00aca5-296d-441b-9c98-d120c839f1e3@copacetic.net> Date: Thu, 28 Mar 2024 15:29:01 -0400 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: 14.0-RELEASE-p6 High acpi_task_* CPU utilization From: Steve Bernacki To: freebsd-questions@FreeBSD.org References: Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.10 / 15.00]; NEURAL_HAM_LONG(-1.00)[-0.996]; NEURAL_HAM_SHORT(-0.98)[-0.981]; NEURAL_HAM_MEDIUM(-0.94)[-0.935]; R_SPF_ALLOW(-0.20)[+ip4:166.78.105.238]; MIME_GOOD(-0.10)[text/plain]; ONCE_RECEIVED(0.10)[]; XM_UA_NO_VERSION(0.01)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_ONE(0.00)[1]; RCPT_COUNT_ONE(0.00)[1]; FREEFALL_USER(0.00)[steve]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:19994, ipnet:166.78.64.0/18, country:US]; R_DKIM_NA(0.00)[]; ARC_NA(0.00)[]; TO_DN_NONE(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[copacetic.net]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; MLMMJ_DEST(0.00)[freebsd-questions@FreeBSD.org]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4V5D9q73lnz4QKk Some additional information: I booted into Linux and noted similar behavior. I was able to identify that the cause of the consumed CPU us due to tens of thousands of interrupts being thrown every second: # grep -Ev "^[ ]*0" /sys/firmware/acpi/interrupts/gpe??; sleep 1; echo ""; grep -Ev "^[ ]*0" /sys/firmware/acpi/interrupt s/gpe?? /sys/firmware/acpi/interrupts/gpe0F: 7932735     STS enabled unmasked /sys/firmware/acpi/interrupts/gpe2C: 7932751  EN STS enabled unmasked /sys/firmware/acpi/interrupts/gpe39: 7932147  EN STS enabled unmasked /sys/firmware/acpi/interrupts/gpe0F: 7940917     STS enabled unmasked /sys/firmware/acpi/interrupts/gpe2C: 7940918  EN STS enabled unmasked /sys/firmware/acpi/interrupts/gpe39: 7940307     STS enabled unmasked Under Linux, I was able to mask these interrupts [1], and CPU utilization dropped to zero: # echo "mask" > /sys/firmware/acpi/interrupts/gpe0F # echo "mask" > /sys/firmware/acpi/interrupts/gpe2C # echo "mask" > /sys/firmware/acpi/interrupts/gpe39 Booting back into FreeBSD, I was able to confirm that acpi0 is throwing the interrupts: steve@fw2:~ $ vmstat -i interrupt                          total       rate irq1: atkbd0                           2          0 irq9: acpi0                       652619       5426 irq39: sdhci_pci0                     13          0 cpu0:timer                        131000       1089 cpu1:timer                         95780        796 cpu2:timer                        109171        908 cpu3:timer                        105658        878 irq128: hdac0                         10          0 irq129: ahci0                       1698         14 irq130: re0                          869          7 irq132: xhci0                        156          1 irq133: iwm0                          22          0 Total                            1096998       9120 I'm going to report this to the system manufacturer, but I don't have high hopes that they'll fix the BIOS. Is there a way under FreeBSD to mask/disable these noisy interrupts? I did some searching but could not find the FreeBSD equivalent of masking in Linux. Thanks Steve [1] https://unix.stackexchange.com/questions/588018/kworker-thread-kacpid-notify-kacpid-hogging-60-70-of-cpu On 3/28/2024 11:20 AM, Steve Bernacki wrote: > Hello, > > I've just installed FreeBSD 14.0-RELEASE-p6 (GENERIC) on a AWOW Mini > PC [1]. Completely idle, top(1) reports unusually high system CPU usage: > >   CPU:  0.0% user,  0.0% nice, 27.7% system,  0.0% interrupt, 72.3% idle > > Running top -SH reveals that the CPU time is being consumed by kernel > acpi_tasks: > >   PID USERNAME    PRI NICE   SIZE    RES STATE    C   TIME    WCPU > COMMAND >    11 root        187 ki31     0B    64K CPU0     0  29:22  97.15% > idle{idle: cpu0} >    11 root        187 ki31     0B    64K RUN      2  22:05  74.21% > idle{idle: cpu2} >    11 root        187 ki31     0B    64K CPU3     3  22:11  73.37% > idle{idle: cpu3} >    11 root        187 ki31     0B    64K RUN      1  21:59  70.21% > idle{idle: cpu1} >     0 root          8    -     0B  1456K -        0   8:08  29.74% > kernel{acpi_task_1} >     0 root          8    -     0B  1456K CPU3     3   8:30  28.67% > kernel{acpi_task_2} >     0 root          8    -     0B  1456K CPU1     1   8:31  26.09% > kernel{acpi_task_0} > > The BIOS configurables for this system are pretty sparse; I'm not able > to see or adjust any ACPI settings. Relevant (I hope) snippets from > dmesg below: > > ====== > CPU: Intel(R) Celeron(R) CPU N3450 @ 1.10GHz (1094.62-MHz K8-class CPU) >   Origin="GenuineIntel"  Id=0x506c9  Family=0x6  Model=0x5c Stepping=9 > Features=0xbfebfbff > > Features2=0x4ff8ebb7 > >   AMD Features=0x2c100800 >   AMD Features2=0x101 >   Structured Extended > Features=0x2294e283 >   XSAVE Features=0xf >   VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID,VID,PostIntr >   TSC: P-state invariant, performance statistics > real memory  = 6442450944 (6144 MB) > avail memory = 5978120192 (5701 MB) > Event timer "LAPIC" quality 600 > ACPI APIC Table: > [snip] > smbios0: at iomem 0xf05e0-0xf05fe > smbios0: Version: 3.0, BCD Revision: 3.0 > aesni0: > acpi0: > acpi0: Power Button (fixed) > unknown: I/O range not supported > ACPI Error: No handler for Region [ECF2] (0xfffff800038c2680) > [EmbeddedControl] (20221020/evregion-292) > ACPI Error: Region EmbeddedControl (ID=3) has no handler > (20221020/exfldio-428) > ACPI Error: Aborting method \134_SB.PCI0.SBRG.H_EC.BAT0._STA due to > previous error (AE_NOT_EXIST) (20221020/psparse-689) > cpu0: on acpi0 > attimer0: port 0x40-0x43,0x50-0x53 irq 0 on acpi0 > [snip] > Timecounter "ACPI-fast" frequency 3579545 Hz quality 900 > acpi_timer0: <32-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0 > acpi_ec0: port 0x62,0x66 on acpi0 > pcib0: port 0xcf8-0xcff on acpi0 > pci0: on pcib0 > ====== > > Relevant kenv output: > > ====== > acpi.oem="ALASKA" > acpi.revision="2" > acpi.rsdp="0x000f05b0" > acpi.rsdt="0x793a5030" > acpi.xsdt="0x00000000793a50c0" > acpi.xsdt_length="36" > acpi_dsdt_load="NO" > acpi_dsdt_name="/boot/acpi_dsdt.aml" > acpi_dsdt_type="acpi_dsdt" > acpi_video_load="NO" > hint.acpi_throttle.0.disabled="1" > smbios.bios.reldate="09/30/2022" > smbios.bios.revision="4.6" > smbios.bios.vendor="American Megatrends Inc." > smbios.bios.version="4.06" > smbios.chassis.type="Mini PC" > smbios.memory.enabled="6291456" > smbios.planar.maker="AWOW Technology Co., Ltd." > smbios.planar.product="PC BOX" > smbios.system.product="AK34" > ====== > > The few search results for similar issues I've found suggest trying to > disable ACPI altogether, which just results in the kernel immediately > panicking when booting. > > Any suggestions on how I can troubleshoot this further? > > Thank you > Steve > > [1] https://www.amazon.com/gp/product/B0B4RMLCH7/?th=1 > > >