From owner-freebsd-current@FreeBSD.ORG Fri Dec 12 03:28:13 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EE89D16A4CE for ; Fri, 12 Dec 2003 03:28:13 -0800 (PST) Received: from mailbox.univie.ac.at (mailbox.univie.ac.at [131.130.1.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id EDDAA43D31 for ; Fri, 12 Dec 2003 03:28:10 -0800 (PST) (envelope-from l.ertl@univie.ac.at) Received: from pcle.cc.univie.ac.at (pcle.cc.univie.ac.at [131.130.2.107]) hBCBRvWX227902; Fri, 12 Dec 2003 12:28:00 +0100 Date: Fri, 12 Dec 2003 12:27:59 +0100 (CET) From: Lukas Ertl To: Taku YAMAMOTO In-Reply-To: <20031212165954.20ee787f.taku@cent.saitama-u.ac.jp> Message-ID: <20031212122545.G665@korben.in.tern> References: <20031209175230.I44055@root.org> <20031211141205.X50937@root.org> <20031212165954.20ee787f.taku@cent.saitama-u.ac.jp> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-DCC-ZID-Univie-Metrics: imap 4244; Body=0 Fuz1=0 Fuz2=0 cc: freebsd-current@freebsd.org cc: acpi-jp@jp.FreeBSD.org Subject: Re: [acpi-jp 2870] ACPI throttling changes X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2003 11:28:14 -0000 On Fri, 12 Dec 2003, Taku YAMAMOTO wrote: > I think we need (CPU_MAX_SPEED-1) instead of CPU_MAX_SPEED when calculating > mask value (in acpi_cpu_throttle_set()): > > --- src/sys/dev/acpica/acpi_cpu.c.orig Fri Nov 28 01:32:46 2003 > +++ src/sys/dev/acpica/acpi_cpu.c Sat Nov 29 20:41:28 2003 > @@ -780,7 +780,7 @@ > /* If we're at maximum speed, that's all */ > if (speed < CPU_MAX_SPEED) { > /* Mask the old CLK_VAL off and or-in the new value */ > - clk_val = CPU_MAX_SPEED << cpu_duty_offset; > + clk_val = (CPU_MAX_SPEED - 1) << cpu_duty_offset; > p_cnt &= ~clk_val; > p_cnt |= (speed << cpu_duty_offset); With this modification I get the expected behaviour: hw.acpi.cpu.current_speed=1 524288000 bytes transferred in 118.457954 secs (4425942 bytes/sec) hw.acpi.cpu.current_speed=2 524288000 bytes transferred in 48.716290 secs (10762067 bytes/sec) hw.acpi.cpu.current_speed=3 524288000 bytes transferred in 30.422634 secs (17233485 bytes/sec) hw.acpi.cpu.current_speed=4 524288000 bytes transferred in 22.128364 secs (23693030 bytes/sec) hw.acpi.cpu.current_speed=5 524288000 bytes transferred in 17.354562 secs (30210385 bytes/sec) hw.acpi.cpu.current_speed=6 524288000 bytes transferred in 14.346382 secs (36544963 bytes/sec) hw.acpi.cpu.current_speed=7 524288000 bytes transferred in 12.192028 secs (43002526 bytes/sec) hw.acpi.cpu.current_speed=8 524288000 bytes transferred in 10.119496 secs (51809695 bytes/sec) regards, le -- Lukas Ertl eMail: l.ertl@univie.ac.at UNIX Systemadministrator Tel.: (+43 1) 4277-14073 Vienna University Computer Center Fax.: (+43 1) 4277-9140 University of Vienna http://mailbox.univie.ac.at/~le/