From owner-freebsd-drivers@FreeBSD.ORG Sun Nov 10 21:46:49 2013 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9FF63B22; Sun, 10 Nov 2013 21:46:49 +0000 (UTC) (envelope-from nicholassmckenzie@gmail.com) Received: from mail-pb0-x232.google.com (mail-pb0-x232.google.com [IPv6:2607:f8b0:400e:c01::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 720BA2437; Sun, 10 Nov 2013 21:46:49 +0000 (UTC) Received: by mail-pb0-f50.google.com with SMTP id xb12so277056pbc.37 for ; Sun, 10 Nov 2013 13:46:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:from:to:content-type:date:message-id:mime-version; bh=JnLUDp2xVQHVPq/HiYevkw2t118s8wmBtH46kJgjYjk=; b=0VUAJ7kuC6cQ6XsF1oIJVYSeCdrN8pfttZ+GpzG7kRE+tJxeTetObs8CFzOBChcuYQ j0vfmY6B0IWAuJ1HBn9NFIn6V8dqgEW0aQmEjMLUrbGN8f3Le5iZmQI29oi3UqJX+uoM MST73F/CJ/oTgIsBk4J9VOI6kTMWq2tS8gjRdJ4gYM5Q59MkikcieSZEkw/N/WryIT0L tztuwY51KJ8aTfCTIbwOhluNzmA3CBBVLr+GRQNYkxGb0cBcjAKltZMq3GyLn670m65j mgRZSRhe0VzccWojkXwrKP5B2pGdP91xdo/AlhyHXWJ04qF8u/YVBFIXLVtWOcZsBl8d 7dPg== X-Received: by 10.69.31.97 with SMTP id kl1mr4447018pbd.127.1384120009107; Sun, 10 Nov 2013 13:46:49 -0800 (PST) Received: from [192.168.43.254] (16.sub-70-211-65.myvzw.com. [70.211.65.16]) by mx.google.com with ESMTPSA id j9sm30702922paj.18.2013.11.10.13.46.46 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Sun, 10 Nov 2013 13:46:47 -0800 (PST) Subject: Problems with amd FX 8 core and freq scaling From: Nicholas Stewart McKenzie To: Drivers , amd64 Content-Type: multipart/mixed; boundary="=-j2AzyNAKUBirh+zn+l8L" Date: Sun, 10 Nov 2013 13:46:29 -0800 Message-ID: <1384119989.1540.9.camel@freebsd.local> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Nov 2013 21:46:49 -0000 --=-j2AzyNAKUBirh+zn+l8L Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit My computer crashes if I enable powerd. I can't get cpu freq scaling to work with my cpu:(P.S. I sent this to both drivers and amd64 mailing list... uname -a FreeBSD freebsd.local 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu Sep 26 22:50:31 UTC 2013 root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 dmesg | grep -A 30 "CPU:" |more CPU: AMD FX(tm)-8350 Eight-Core Processor (4018.42-MHz K8-class CPU) Origin = "AuthenticAMD" Id = 0x600f20 Family = 0x15 Model = 0x2 Stepping = 0 Features=0x178bfbff Features2=0x3e98320b AMD Features=0x2e500800 AMD Features2=0x1ebbfff,NodeId,TBM,Topology,,> Standard Extended Features=0x8 TSC: P-state invariant, performance statistics real memory = 17179869184 (16384 MB) avail memory = 16457981952 (15695 MB) Event timer "LAPIC" quality 400 ACPI APIC Table: FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs FreeBSD/SMP: 1 package(s) x 8 core(s) cpu0 (BSP): APIC ID: 16 cpu1 (AP): APIC ID: 17 cpu2 (AP): APIC ID: 18 cpu3 (AP): APIC ID: 19 cpu4 (AP): APIC ID: 20 cpu5 (AP): APIC ID: 21 cpu6 (AP): APIC ID: 22 cpu7 (AP): APIC ID: 23 ACPI Warning: Optional field Pm2ControlBlock has zero address or length: 0x0000000000000000/0x1 (20110527/tbfadt-586) ioapic0 irqs 0-23 on motherboard ioapic1 irqs 24-55 on motherboard kbd1 at kbdmux0 acpi0: on motherboard acpi0: Power Button (fixed) cpu0: on acpi0 cpu1: on acpi0 rc.conf hostname= ifconfig_re0= #ifconfig_re0= sshd_enable="YES" ntpd_enable="YES" # Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable dumpdev="AUTO" fusefs_enable="YES" ################# powerd_enable="NO" @@@@@@@@@@@@@@@@@ dbus_enable="YES" hald_enable="YES" devfs_system_ruleset="system" loader.conf linux_load="YES" drm_load="YES" linprocfs_load="YES" nvidia_load="YES" sem_load="YES" vboxdrv_load="YES" mono_load="YES" cuse4bsd_load="YES" dmesg attached --=-j2AzyNAKUBirh+zn+l8L Content-Disposition: attachment; filename="dmesg" Content-Type: text/plain; name="dmesg"; charset="us-ascii" Content-Transfer-Encoding: 7bit Copyright (c) 1992-2013 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 9.2-RELEASE #0 r255898: Thu Sep 26 22:50:31 UTC 2013 root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 gcc version 4.2.1 20070831 patched [FreeBSD] CPU: AMD FX(tm)-8350 Eight-Core Processor (4018.42-MHz K8-class CPU) Origin = "AuthenticAMD" Id = 0x600f20 Family = 0x15 Model = 0x2 Stepping = 0 Features=0x178bfbff Features2=0x3e98320b AMD Features=0x2e500800 AMD Features2=0x1ebbfff,NodeId,TBM,Topology,,> Standard Extended Features=0x8 TSC: P-state invariant, performance statistics real memory = 17179869184 (16384 MB) avail memory = 16457981952 (15695 MB) Event timer "LAPIC" quality 400 ACPI APIC Table: FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs FreeBSD/SMP: 1 package(s) x 8 core(s) cpu0 (BSP): APIC ID: 16 cpu1 (AP): APIC ID: 17 cpu2 (AP): APIC ID: 18 cpu3 (AP): APIC ID: 19 cpu4 (AP): APIC ID: 20 cpu5 (AP): APIC ID: 21 cpu6 (AP): APIC ID: 22 cpu7 (AP): APIC ID: 23 ACPI Warning: Optional field Pm2ControlBlock has zero address or length: 0x0000000000000000/0x1 (20110527/tbfadt-586) ioapic0 irqs 0-23 on motherboard ioapic1 irqs 24-55 on motherboard Cuse4BSD v0.1.30 @ /dev/cuse kbd1 at kbdmux0 acpi0: on motherboard acpi0: Power Button (fixed) cpu0: on acpi0 cpu1: on acpi0 cpu2: on acpi0 cpu3: on acpi0 cpu4: on acpi0 cpu5: on acpi0 cpu6: on acpi0 cpu7: on acpi0 attimer0: port 0x40-0x43 irq 0 on acpi0 Timecounter "i8254" frequency 1193182 Hz quality 0 Event timer "i8254" frequency 1193182 Hz quality 100 atrtc0: port 0x70-0x71 irq 8 on acpi0 Event timer "RTC" frequency 32768 Hz quality 0 hpet0: iomem 0xfed00000-0xfed003ff on acpi0 hpet0: HPET never increments, disabling device_attach: hpet0 attach returned 6 Timecounter "ACPI-fast" frequency 3579545 Hz quality 900 acpi_timer0: <32-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 pcib1: irq 52 at device 2.0 on pci0 pci1: on pcib1 vgapci0: port 0xe000-0xe07f mem 0xfd000000-0xfdffffff,0xc0000000-0xcfffffff,0xd0000000-0xd1ffffff irq 24 at device 0.0 on pci1 nvidia0: on vgapci0 vgapci0: child nvidia0 requested pci_enable_io vgapci0: child nvidia0 requested pci_enable_io hdac0: mem 0xfe080000-0xfe083fff irq 25 at device 0.1 on pci1 pcib2: irq 53 at device 9.0 on pci0 pci2: on pcib2 xhci0: mem 0xfe400000-0xfe407fff irq 48 at device 0.0 on pci2 xhci0: 64 byte context size. usbus0 on xhci0 pcib3: irq 54 at device 10.0 on pci0 pci3: on pcib3 ahci0: port 0xd040-0xd047,0xd030-0xd033,0xd020-0xd027,0xd010-0xd013,0xd000-0xd00f mem 0xfe310000-0xfe3101ff irq 47 at device 0.0 on pci3 ahci0: AHCI v1.00 with 2 6Gbps ports, Port Multiplier supported with FBS ahci0: quirks=0x100 ahcich0: at channel 0 on ahci0 ahcich1: at channel 1 on ahci0 ahci1: port 0xf040-0xf047,0xf030-0xf033,0xf020-0xf027,0xf010-0xf013,0xf000-0xf00f mem 0xfe50b000-0xfe50b3ff irq 19 at device 17.0 on pci0 ahci1: AHCI v1.20 with 6 6Gbps ports, Port Multiplier supported ahcich2: at channel 0 on ahci1 ahcich3: at channel 1 on ahci1 ahcich4: at channel 2 on ahci1 ahcich5: at channel 3 on ahci1 ahcich6: at channel 4 on ahci1 ahcich7: at channel 5 on ahci1 ohci0: mem 0xfe50a000-0xfe50afff irq 18 at device 18.0 on pci0 usbus1 on ohci0 ehci0: mem 0xfe509000-0xfe5090ff irq 17 at device 18.2 on pci0 usbus2: EHCI version 1.0 usbus2 on ehci0 ohci1: mem 0xfe508000-0xfe508fff irq 18 at device 19.0 on pci0 usbus3 on ohci1 ehci1: mem 0xfe507000-0xfe5070ff irq 17 at device 19.2 on pci0 usbus4: EHCI version 1.0 usbus4 on ehci1 pci0: at device 20.0 (no driver attached) hdac1: mem 0xfe500000-0xfe503fff irq 16 at device 20.2 on pci0 isab0: at device 20.3 on pci0 isa0: on isab0 pcib4: at device 20.4 on pci0 pci4: on pcib4 pci4: at device 14.0 (no driver attached) ohci2: mem 0xfe506000-0xfe506fff irq 18 at device 20.5 on pci0 usbus5 on ohci2 pcib5: at device 21.0 on pci0 pci5: on pcib5 re0: port 0xb000-0xb0ff mem 0xd2104000-0xd2104fff,0xd2100000-0xd2103fff irq 16 at device 0.0 on pci5 re0: Using 1 MSI-X message re0: Chip rev. 0x2c800000 re0: MAC rev. 0x00000000 miibus0: on re0 rgephy0: PHY 1 on miibus0 rgephy0: none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX, 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, 1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, auto-flow re0: Ethernet address: ########### pcib6: at device 21.1 on pci0 pci6: on pcib6 xhci1: mem 0xfe100000-0xfe107fff irq 17 at device 0.0 on pci6 xhci1: 64 byte context size. usbus6 on xhci1 ohci3: mem 0xfe505000-0xfe505fff irq 18 at device 22.0 on pci0 usbus7 on ohci3 ehci2: mem 0xfe504000-0xfe5040ff irq 17 at device 22.2 on pci0 usbus8: EHCI version 1.0 usbus8 on ehci2 acpi_button0: on acpi0 uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 atkbdc0: at port 0x60,0x64 on isa0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] ppc0: cannot reserve I/O port range acpi_throttle0: on cpu0 hwpstate0: on cpu0 acpi_throttle1: on cpu1 acpi_throttle1: failed to attach P_CNT device_attach: acpi_throttle1 attach returned 6 acpi_throttle2: on cpu2 acpi_throttle2: failed to attach P_CNT device_attach: acpi_throttle2 attach returned 6 acpi_throttle3: on cpu3 acpi_throttle3: failed to attach P_CNT device_attach: acpi_throttle3 attach returned 6 acpi_throttle4: on cpu4 acpi_throttle4: failed to attach P_CNT device_attach: acpi_throttle4 attach returned 6 acpi_throttle5: on cpu5 acpi_throttle5: failed to attach P_CNT device_attach: acpi_throttle5 attach returned 6 acpi_throttle6: on cpu6 acpi_throttle6: failed to attach P_CNT device_attach: acpi_throttle6 attach returned 6 acpi_throttle7: on cpu7 acpi_throttle7: failed to attach P_CNT device_attach: acpi_throttle7 attach returned 6 Timecounters tick every 1.000 msec vboxdrv: fAsync=0 offMin=0x8d3 offMax=0xc8e hdacc0: at cad 0 on hdac0 hdaa0: at nid 1 on hdacc0 pcm0: at nid 4 on hdaa0 pcm1: at nid 5 on hdaa0 pcm2: at nid 7 on hdaa0 hdacc1: at cad 0 on hdac1 hdaa1: at nid 1 on hdacc1 pcm3: at nid 20,22,21,23 and 24,26 on hdaa1 pcm4: at nid 27 and 25 on hdaa1 pcm5: at nid 17 on hdaa1 pcm6: at nid 30 on hdaa1 usbus0: 5.0Gbps Super Speed USB v3.0 usbus1: 12Mbps Full Speed USB v1.0 usbus2: 480Mbps High Speed USB v2.0 usbus3: 12Mbps Full Speed USB v1.0 usbus4: 480Mbps High Speed USB v2.0 usbus5: 12Mbps Full Speed USB v1.0 usbus6: 5.0Gbps Super Speed USB v3.0 usbus7: 12Mbps Full Speed USB v1.0 usbus8: 480Mbps High Speed USB v2.0 ugen0.1: <0x1b6f> at usbus0 uhub0: <0x1b6f XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0 ugen1.1: at usbus1 uhub1: on usbus1 ugen2.1: at usbus2 uhub2: on usbus2 ugen3.1: at usbus3 uhub3: on usbus3 ugen4.1: at usbus4 uhub4: on usbus4 ugen5.1: at usbus5 uhub5: on usbus5 ugen6.1: <0x1b6f> at usbus6 uhub6: <0x1b6f XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus6 ugen7.1: at usbus7 uhub7: on usbus7 ugen8.1: at usbus8 uhub8: on usbus8 ada0 at ahcich4 bus 0 scbus4 target 0 lun 0 ada0: ATA-8 SATA 3.x device ada0: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes) ada0: Command Queueing enabled ada0: 953869MB (1953525168 512 byte sectors: 16H 63S/T 16383C) ada0: quirks=0x1<4K> ada0: Previously was known as ad12 ada1 at ahcich5 bus 0 scbus5 target 0 lun 0 ada1: ATA-8 SATA 2.x device ada1: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes) ada1: Command Queueing enabled ada1: 953869MB (1953525168 512 byte sectors: 16H 63S/T 16383C) ada1: Previously was known as ad14 SMP: AP CPU #1 Launched! cd0 at ahcich3 bus 0 scbus3 target 0 lun 0 cd0: Removable CD-ROM SCSI-0 device cd0: 150.000MB/s transfers (SMP: AP CPU #6 Launched! SATA 1.x, UDMA5, ATAPI 12bytes, PIO 8192bytes) cd0: Attempt to query device size failed: NOT READY, Medium not present - tray closed SMP: AP CPU #2 Launched! SMP: AP CPU #7 Launched! SMP: AP CPU #4 Launched! SMP: AP CPU #3 Launched! SMP: AP CPU #5 Launched! Timecounter "TSC-low" frequency 2009208814 Hz quality 1000 uhub5: 2 ports with 2 removable, self powered uhub7: 4 ports with 4 removable, self powered uhub1: 5 ports with 5 removable, self powered uhub3: 5 ports with 5 removable, self powered uhub0: 4 ports with 4 removable, self powered uhub6: 4 ports with 4 removable, self powered Root mount waiting for: usbus8 usbus4 usbus2 Root mount waiting for: usbus8 usbus4 usbus2 uhub8: 4 ports with 4 removable, self powered uhub4: 5 ports with 5 removable, self powered uhub2: 5 ports with 5 removable, self powered Trying to mount root from ufs:/dev/ada0p2 [rw]... ugen7.2: at usbus7 ukbd0: on usbus7 kbd2 at ukbd0 ums0: on usbus7 ums0: 5 buttons and [XYZT] coordinates ID=26 ums0: 0 buttons and [T] coordinates ID=0 uhid0: on usbus7 fuse4bsd: version 0.3.9-pre1, FUSE ABI 7.19 ugen8.2: at usbus8 umass0: on usbus8 umass0: SCSI over Bulk-Only; quirks = 0x0100 umass0:8:0:-1: Attached to scbus8 da0 at umass-sim0 bus 0 scbus8 target 0 lun 0 da0: < USB DISK 3.0 PMAP> Removable Direct Access SCSI-6 device da0: 40.000MB/s transfers da0: 14786MB (30283008 512 byte sectors: 255H 63S/T 1885C) da0: quirks=0x3 --=-j2AzyNAKUBirh+zn+l8L-- From owner-freebsd-drivers@FreeBSD.ORG Mon Nov 11 18:17:09 2013 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BEF83E49; Mon, 11 Nov 2013 18:17:09 +0000 (UTC) (envelope-from nicholassmckenzie@gmail.com) Received: from mail-wg0-x22b.google.com (mail-wg0-x22b.google.com [IPv6:2a00:1450:400c:c00::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3A4B92BD8; Mon, 11 Nov 2013 18:17:09 +0000 (UTC) Received: by mail-wg0-f43.google.com with SMTP id n12so2084865wgh.22 for ; Mon, 11 Nov 2013 10:17:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=vDoBaBYcWvUy0rVPevdLo8KZAkshfmGu1V60GGfVjQw=; b=VxAcbAW66uzmQkyUu/l2g+jtD55MYSO6VUnh0aF5iICdOu5WLL/P+Pk9qIaWBel8DQ PUtM8pIxLS6IBqzQz1Zw6NgQ6brZK6uY46fH2QJouIlC8HdZI5uBsgx+f9Wh5PpH2fMR BOkrngVXPJcxNSCXcTZByo/eHYxcr+vU1OcyHG5pkUH1QJOOfPPmVl/1XpxFD1Bp536T otykyLi98IWD/Ud+U4OqLeXBWkR2mWZLjXQoyCwo8bJ2Jwlle4LM5yeLhHuZ+jiqUnrG UjAW1VeAs4LHuWSztWdXNIXeNnf7CPoFxzCT/dj6ny4x9VzrbutLC+r1b4b8ENFkwnoM 0v9w== X-Received: by 10.194.175.66 with SMTP id by2mr2014253wjc.59.1384193827654; Mon, 11 Nov 2013 10:17:07 -0800 (PST) MIME-Version: 1.0 Received: by 10.217.88.74 with HTTP; Mon, 11 Nov 2013 10:16:47 -0800 (PST) In-Reply-To: <5280A76B.20307@freebsd.org> References: <1384119989.1540.9.camel@freebsd.local> <5280A76B.20307@freebsd.org> From: Nicholas McKenzie Date: Mon, 11 Nov 2013 10:16:47 -0800 Message-ID: Subject: Re: Problems with amd FX 8 core and freq scaling To: Drivers , amd64 Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Nov 2013 18:17:09 -0000 But wouldn't this just disable frequency scaling and the whole point of powerd? On Mon, Nov 11, 2013 at 1:46 AM, Stefan Esser wrote: > > Am 10.11.2013 22:46, schrieb Nicholas Stewart McKenzie: > > My computer crashes if I enable powerd. I can't get cpu freq scaling to > > work with my cpu:(P.S. I sent this to both drivers and amd64 mailing > > list... > > Hi, > > you may want to try booting with the following line added to > /boot/loader.conf (or entered at the boot menu prompt after > breaking out of automatic boot): > > hint.acpi_throttle.0.disabled="1" > > There have been a number of reports of throttling causing > crashes. This setting does not prevent powerd from adjusting > your CPU's clock, it just disables some arcane feature which > pre-dates the modern power management methods. > > Regards, STefan -- Nicholas S. McKenzie NicholasSMcKenzie@gmail.com +1.530.355.6171 From owner-freebsd-drivers@FreeBSD.ORG Mon Nov 11 19:56:25 2013 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by hub.freebsd.org (Postfix) with ESMTP id 42E8D82D; Mon, 11 Nov 2013 19:56:25 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Message-ID: <5281358D.1010406@FreeBSD.org> Date: Mon, 11 Nov 2013 14:52:45 -0500 From: Jung-uk Kim User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Nicholas McKenzie , freebsd-drivers@freebsd.org, freebsd-amd64@freebsd.org Subject: Re: Problems with amd FX 8 core and freq scaling References: <1384119989.1540.9.camel@freebsd.local> <5280A76B.20307@freebsd.org> In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: multipart/mixed; boundary="------------060701040904010101070308" X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Nov 2013 19:56:25 -0000 This is a multi-part message in MIME format. --------------060701040904010101070308 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2013-11-11 13:16:47 -0500, Nicholas McKenzie wrote: > But wouldn't this just disable frequency scaling and the whole > point of powerd? No. acpi_throttle (and p4tcc) controls T-state. "Frequency scaling" should be done by changing P-state. > On Mon, Nov 11, 2013 at 1:46 AM, Stefan Esser > wrote: >> >> Am 10.11.2013 22:46, schrieb Nicholas Stewart McKenzie: >>> My computer crashes if I enable powerd. I can't get cpu freq >>> scaling to work with my cpu:(P.S. I sent this to both drivers >>> and amd64 mailing list... >> >> Hi, >> >> you may want to try booting with the following line added to >> /boot/loader.conf (or entered at the boot menu prompt after >> breaking out of automatic boot): >> >> hint.acpi_throttle.0.disabled="1" >> >> There have been a number of reports of throttling causing >> crashes. This setting does not prevent powerd from adjusting your >> CPU's clock, it just disables some arcane feature which pre-dates >> the modern power management methods. I rewrote acpi_throttle.c at some point to fix the problem but never committed it because nobody was really interested in testing the patch. Also, it is really an arcane and archaic feature: http://software.intel.com/en-us/blogs/2013/10/15/c-states-p-states-where-the-heck-are-those-t-states Now I think we should disable the feature by default because it is causing too much hassle for us (attached). Any objection? Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQEcBAEBAgAGBQJSgTWNAAoJEHyflib82/FGsqUIAIhv2t69myurKlkZxJw06tjq 47skw20kG1NlxQ97SspL1Blap9yvMkETL3XgR6f6rdgIze8K0wpCIjB19rSg2OIX yqV1RGC30vWoX2cG4ccKiw8G/juqIbqBpGjHf/pG9LUM4upQQ59gDzkVlCnmorzg kzBTBEM9TpomqOttB4YICxzkhztcorKJ3cClaPKfoO2Ds9WpQaOYl6b3YW0HUaRW 7VtwjEMDg3BwNoBusBIK+ZLSUSNP5smffX1/oyGHA0QGZCrlMwoH7j5fdZj9weiY nxM1/jZ+fpiV33jfAt4HzavQDxnpHvYsf5v54Jlmrm+FNtCCp7tWICK/KjVqrn0= =E6TS -----END PGP SIGNATURE----- --------------060701040904010101070308 Content-Type: text/x-patch; name="cpu_throttle.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="cpu_throttle.diff" Index: sys/dev/acpica/acpi_throttle.c =================================================================== --- sys/dev/acpica/acpi_throttle.c (revision 258002) +++ sys/dev/acpica/acpi_throttle.c (working copy) @@ -167,7 +167,7 @@ static int acpi_throttle_probe(device_t dev) { - if (resource_disabled("acpi_throttle", 0)) + if (!resource_enabled("acpi_throttle", 0)) return (ENXIO); /* @@ -177,7 +177,7 @@ acpi_throttle_probe(device_t dev) * we disable acpi_throttle when p4tcc is also present. */ if (device_find_child(device_get_parent(dev), "p4tcc", -1) && - !resource_disabled("p4tcc", 0)) + resource_ensabled("p4tcc", 0)) return (ENXIO); device_set_desc(dev, "ACPI CPU Throttling"); Index: sys/kern/subr_hints.c =================================================================== --- sys/kern/subr_hints.c (revision 258002) +++ sys/kern/subr_hints.c (working copy) @@ -449,15 +449,29 @@ resource_find_dev(int *anchor, const char *name, i } /* - * Check to see if a device is disabled via a disabled hint. + * Check to see if a device is disabled or enabled via a hint. */ -int -resource_disabled(const char *name, int unit) +static __inline int +resource_find_hint(const char *name, int unit, const char *hint) { int error, value; - error = resource_int_value(name, unit, "disabled", &value); + error = resource_int_value(name, unit, hint, &value); if (error) return (0); return (value); } + +int +resource_disabled(const char *name, int unit) +{ + + return (resource_find_hint(name, unit, "disabled")); +} + +int +resource_enabled(const char *name, int unit) +{ + + return (resource_find_hint(name, unit, "enabled")); +} Index: sys/sys/bus.h =================================================================== --- sys/sys/bus.h (revision 258002) +++ sys/sys/bus.h (working copy) @@ -503,6 +503,7 @@ int resource_long_value(const char *name, int unit int resource_string_value(const char *name, int unit, const char *resname, const char **result); int resource_disabled(const char *name, int unit); +int resource_enabled(const char *name, int unit); int resource_find_match(int *anchor, const char **name, int *unit, const char *resname, const char *value); int resource_find_dev(int *anchor, const char *name, int *unit, Index: sys/x86/cpufreq/p4tcc.c =================================================================== --- sys/x86/cpufreq/p4tcc.c (revision 258002) +++ sys/x86/cpufreq/p4tcc.c (working copy) @@ -142,7 +142,7 @@ static int p4tcc_probe(device_t dev) { - if (resource_disabled("p4tcc", 0)) + if (!resource_enabled("p4tcc", 0)) return (ENXIO); device_set_desc(dev, "CPU Frequency Thermal Control"); --------------060701040904010101070308-- From owner-freebsd-drivers@FreeBSD.ORG Tue Nov 12 19:54:56 2013 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26201392 for ; Tue, 12 Nov 2013 19:54:56 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 00B3F213D for ; Tue, 12 Nov 2013 19:54:56 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 0EEB1B9A3; Tue, 12 Nov 2013 14:54:55 -0500 (EST) From: John Baldwin To: freebsd-drivers@freebsd.org, Nomad Esst Subject: Re: Change order of modules loading in kernel Date: Tue, 12 Nov 2013 13:29:13 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20130906; KDE/4.5.5; amd64; ; ) References: <1383818164.21969.YahooMailNeo@web162703.mail.bf1.yahoo.com> In-Reply-To: <1383818164.21969.YahooMailNeo@web162703.mail.bf1.yahoo.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201311121329.13602.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 12 Nov 2013 14:54:55 -0500 (EST) X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Nov 2013 19:54:56 -0000 On Thursday, November 07, 2013 4:56:04 am Nomad Esst wrote: > Hi > First thanks to Mr. John Baldwin, helped me with my previous questions. > > With his helps, I made some changes in order to make em and igb driver name ports "foo". > Now the changes are : > "if_igb.c" : Change "igb" to "foo" in device_t structure b: > static driver_t igb_driver = { > "foo", igb_methods, sizeof(struct adapter), > }; > > static devclass_t igb_devclass; > DRIVER_MODULE(igb, pci, igb_driver, igb_devclass, 0, 0); > MODULE_DEPEND(igb, pci, 1, 1, 1); > MODULE_DEPEND(igb, ether, 1, 1, 1); > > Also for "if_em.c" : Change "em" to "foo" in device_t structure b: > > static driver_t em_driver = { > "foo", em_methods, sizeof(struct adapter), > }; > devclass_t em_devclass; > DRIVER_MODULE(em, pci, em_driver, em_devclass, 0, 0); > MODULE_DEPEND(em, pci, 1, 1, 1); > MODULE_DEPEND(em, ether, 1, 1, 1); > > Now, I have my interfaces like : foo0 , foo1 , foo2 , foo3 , foo4 , foo5 > The firs four interface (old "igb"s) are located at the right side of my server an the last two ones (old "em"s) are located at the left side, you can see the problem. I want the "em" module load before "igb". Can I do so? You cannot force this as it depends on how your motherboard enumerates PCI devices. I think another person's suggestion of just renaming the interfaces via rc.conf during boot is probably going to be simplest for you. > By the way! Different driver naming in device_t structure and in DRIVER_MODULE and the other two macros (as I have done) causes problems? That should be ok. -- John Baldwin