High interrupt load when VIA C3 CPU is running at half speed
Bruce Cran
bruce at cran.org.uk
Fri Nov 2 17:45:15 PDT 2007
I've come across a strange issue on my EPIA 5000 router that's running
7.0-BETA1. It has a VIA C3 CPU that can either run at 530MHz or
265MHz. Whenever I set the CPU to half it's full speed the interrupt
CPU% jumps from around 2% at most to a continuous 15-20%. At the same
time, the "swi4: clock sio" task starts using around 10% CPU all the
time. I've checked with vmstat -i and it doesn't show any change in the
interrupt rate so I don't know what might be going on to cause such as
increase in CPU usage. It has the following ACPI settings:
dev.cpu.0.%desc: ACPI CPU
dev.cpu.0.%driver: cpu
dev.cpu.0.%location: handle=\_PR_.CPU0
dev.cpu.0.%pnpinfo: _HID=none _UID=0
dev.cpu.0.%parent: acpi0
dev.cpu.0.freq: 530
dev.cpu.0.freq_levels: 530/-1 265/-1
dev.cpu.0.cx_supported: C1/0 C2/90 C3/900
dev.cpu.0.cx_lowest: C1
dev.cpu.0.cx_usage: 100.00% 0.00% 0.00%
kern.timecounter.choice: TSC(800) ACPI-safe(850) i8254(0) dummy(-1000000)
kern.timecounter.hardware: ACPI-safe
kern.clockrate: { hz = 1000, tick = 1000, profhz = 1024, stathz = 128 }
When running at 530MHz, top -S displays:
last pid: 17761; load averages: 0.00, 0.00, 0.00
up 3+03:10:35 00:31:45
52 processes: 2 running, 35 sleeping, 15 waiting
CPU states: % user, % nice, % system, % interrupt, %
idle
Mem: 9884K Active, 68M Inact, 29M Wired, 1584K Cache, 21M Buf, 6268K Free
Swap: 2048M Total, 2048M Free
PID USERNAME THR PRI NICE SIZE RES STATE TIME WCPU COMMAND
11 root 1 171 ki31 0K 8K RUN 74.3H 100.00% idle
12 root 1 -32 - 0K 8K WAIT 35:17 0.20% swi4:
clock sio
But when dev.cpu.0.freq is set to 265, it changes to:
last pid: 17783; load averages: 0.59, 0.13, 0.05
up 3+03:12:01 00:33:11
52 processes: 2 running, 35 sleeping, 15 waiting
CPU states: % user, % nice, % system, % interrupt, %
idle
Mem: 9888K Active, 68M Inact, 29M Wired, 1584K Cache, 21M Buf, 6264K Free
Swap: 2048M Total, 2048M Free
PID USERNAME THR PRI NICE SIZE RES STATE TIME WCPU COMMAND
11 root 1 171 ki31 0K 8K RUN 74.3H 66.46% idle
12 root 1 -32 - 0K 8K WAIT 35:20 9.77% swi4:
clock sio
When this happens I occasionally see the swi4 task in the Giant* state.
I've copied my kernel configuration and dmesg below. While it's not
causing a real problem since I can just run the CPU at full speed, it
would be nice to throttle it back since it's idle for the vast majority
of the time. Is there anything more I can do to try and find out what's
going on?
--
Bruce
dmesg:
Copyright (c) 1992-2007 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 7.0-BETA1 #0: Tue Oct 30 01:41:12 GMT 2007
brucec at router.draftnet:/usr/obj/usr/src/sys/ROUTER
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: VIA C3 Nehemiah+RNG+AES (533.36-MHz 686-class CPU)
Origin = "CentaurHauls" Id = 0x698 Stepping = 8
Features=0x381b93f<FPU,VME,DE,PSE,TSC,MSR,CX8,SEP,MTRR,PGE,CMOV,PAT,MMX,FXSR,SSE>
real memory = 132055040 (125 MB)
avail memory = 119709696 (114 MB)
cryptosoft0: <software crypto> on motherboard
acpi0: <VIA601 AWRDACPI> on motherboard
acpi0: [ITHREAD]
acpi0: Power Button (fixed)
acpi0: reservation of 0, a0000 (3) failed
acpi0: reservation of 100000, 7cf0000 (3) failed
Timecounter "ACPI-safe" frequency 3579545 Hz quality 850
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x4008-0x400b on acpi0
cpu0: <ACPI CPU> on acpi0
acpi_throttle0: <ACPI CPU Throttling> on cpu0
acpi_button0: <Power Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port
0xcf8-0xcff,0x4000-0x407f,0x4080-0x40ff,0x5000-0x500f,0x6000-0x607f on acpi0
pci0: <ACPI PCI bus> on pcib0
pcib1: <PCI-PCI bridge> at device 1.0 on pci0
pci1: <PCI bus> on pcib1
vgapci0: <VGA-compatible display> mem
0xd1800000-0xd1ffffff,0xd2000000-0xd201ffff,0xd1000000-0xd17fffff irq 11
at device 0.0 on pci1
isab0: <PCI-ISA bridge> at device 17.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <VIA 8231 UDMA100 controller> port
0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xe800-0xe80f at device 17.1 on pci0
ata0: <ATA channel 0> on atapci0
ata0: [ITHREAD]
ata1: <ATA channel 1> on atapci0
ata1: [ITHREAD]
pci0: <serial bus, USB> at device 17.2 (no driver attached)
pci0: <serial bus, USB> at device 17.3 (no driver attached)
pci0: <bridge> at device 17.4 (no driver attached)
pci0: <multimedia, audio> at device 17.5 (no driver attached)
vr0: <VIA VT6102 Rhine II 10/100BaseTX> port 0xe400-0xe4ff mem
0xd5400000-0xd54000ff irq 11 at device 18.0 on pci0
vr0: Quirks: 0x0
miibus0: <MII bus> on vr0
ukphy0: <Generic IEEE 802.3u media interface> PHY 1 on miibus0
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
vr0: using obsoleted if_watchdog interface
vr0: Ethernet address: 00:40:63:e3:d1:b7
vr0: [ITHREAD]
pcib2: <PCI-PCI bridge> at device 20.0 on pci0
pci2: <PCI bus> on pcib2
dc0: <Intel 21143 10/100BaseTX> port 0xc000-0xc07f mem
0xd4000000-0xd40003ff irq 5 at device 4.0 on pci2
miibus1: <MII bus> on dc0
ukphy1: <Generic IEEE 802.3u media interface> PHY 1 on miibus1
ukphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
dc0: Ethernet address: 00:80:c8:c9:96:6d
dc0: [ITHREAD]
dc1: <Intel 21143 10/100BaseTX> port 0xc400-0xc47f mem
0xd4001000-0xd40013ff irq 12 at device 5.0 on pci2
miibus2: <MII bus> on dc1
ukphy2: <Generic IEEE 802.3u media interface> PHY 1 on miibus2
ukphy2: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
dc1: Ethernet address: 00:80:c8:c9:96:6e
dc1: [ITHREAD]
dc2: <Intel 21143 10/100BaseTX> port 0xc800-0xc87f mem
0xd4002000-0xd40023ff irq 10 at device 6.0 on pci2
miibus3: <MII bus> on dc2
ukphy3: <Generic IEEE 802.3u media interface> PHY 1 on miibus3
ukphy3: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
dc2: Ethernet address: 00:80:c8:c9:96:6f
dc2: [ITHREAD]
dc3: <Intel 21143 10/100BaseTX> port 0xcc00-0xcc7f mem
0xd4003000-0xd40033ff irq 11 at device 7.0 on pci2
miibus4: <MII bus> on dc3
ukphy4: <Generic IEEE 802.3u media interface> PHY 1 on miibus4
ukphy4: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
dc3: Ethernet address: 00:80:c8:c9:96:70
dc3: [ITHREAD]
acpi_tz0: <Thermal Zone> on acpi0
sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on
acpi0
sio0: type 16550A, console
sio0: [FILTER]
padlock0: <AES-CBC> on motherboard
pmtimer0 on isa0
orm0: <ISA Option ROMs> at iomem
0xc0000-0xcbfff,0xcc000-0xcffff,0xd0000-0xd9fff pnpid ORM0000 on isa0
sio1: configured irq 3 not in bitmap of probed irqs 0
sio1: port may not be enabled
Timecounter "TSC" frequency 533355919 Hz quality 800
Timecounters tick every 1.000 msec
ad0: 305245MB <MAXTOR STM3320820A 3.AAE> at ata0-master UDMA100
ad2: 491MB <CF300 Ver1.27> at ata1-master UDMA33
Trying to mount root from ufs:/dev/ad2s1a
bridge0: Ethernet address: de:ba:29:e2:13:a4
dc3: link state changed to DOWN
dc3: link state changed to UP
dc3: link state changed to DOWN
dc3: link state changed to UP
Kernel configuration:
cpu I686_CPU
ident ROUTER
# To statically compile in device wiring instead of /boot/device.hints
#hints "GENERIC.hints" # Default places to look for
devices.
makeoptions DEBUG=-g # Build kernel with gdb(1) debug
symbols
options SCHED_ULE # 4BSD scheduler
options PREEMPTION # Enable kernel thread preemption
options INET # InterNETworking
options INET6 # IPv6 communications protocols
options SCTP # Stream Transmission Control
Protocol
options FFS # Berkeley Fast Filesystem
options SOFTUPDATES # Enable FFS soft updates support
options UFS_ACL # Support for access control lists
options UFS_DIRHASH # Improve performance on big
directories
options UFS_GJOURNAL # Enable gjournal-based UFS
journaling
options PROCFS # Process filesystem (requires
PSEUDOFS)
options PSEUDOFS # Pseudo-filesystem framework
options GEOM_PART_GPT # GUID Partition Tables.
options GEOM_LABEL # Provides labelization
options COMPAT_43TTY # BSD 4.3 TTY compat [KEEP THIS!]
options COMPAT_FREEBSD4 # Compatible with FreeBSD4
options COMPAT_FREEBSD5 # Compatible with FreeBSD5
options COMPAT_FREEBSD6 # Compatible with FreeBSD6
options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI
options KTRACE # ktrace(1) support
options SYSVSHM # SYSV-style shared memory
options SYSVMSG # SYSV-style message queues
options SYSVSEM # SYSV-style semaphores
options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time
extensions
options KBD_INSTALL_CDEV # install a CDEV entry in /dev
options ADAPTIVE_GIANT # Giant mutex is adaptive.
options STOP_NMI # Stop CPUS using NMI instead of IPI
options AUDIT # Security event auditing
options KDB # Enable kernel debugger support.
options DDB # Support DDB.
# options GDB # Support remote GDB.
# options INVARIANTS # Enable calls of extra sanity
checking
# options INVARIANT_SUPPORT # Extra sanity checks of
internal structures, required by INVARIANTS
# options WITNESS # Enable checks to detect
deadlocks and cycles
# options WITNESS_SKIPSPIN # Don't run witness on spinlocks
for speed
# To make an SMP kernel, the next two lines are needed
device apic # I/O APIC
# Bus support.
device eisa
device pci
# ATA and ATAPI devices
device ata
device atadisk # ATA disk drives
options ATA_STATIC_ID # Static device numbering
# Add suspend/resume support for the i8254.
device pmtimer
# Serial (COM) ports
device sio # 8250, 16[45]50 based serial ports
device miibus # MII bus support
device dc # DEC/Intel 21143 and various workalikes
device vr # VIA Rhine, Rhine II
# Pseudo devices.
device loop # Network loopback
device random # Entropy device
device ether # Ethernet support
device pty # Pseudo-ttys (telnet etc)
device gif
# The `bpf' device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
# Note that 'bpf' is required for DHCP.
device bpf # Berkeley packet filter
device pf
device pfsync
device pflog
device crypto
device padlock
device if_bridge
# options HZ=100
options ALTQ
options ALTQ_CDNR
options ALTQ_HFSC
options ALTQ_PRIQ
options ZERO_COPY_SOCKETS
More information about the freebsd-acpi
mailing list