From owner-freebsd-hardware@FreeBSD.ORG Mon Aug 28 18:41:58 2006 Return-Path: X-Original-To: hardware@freebsd.org Delivered-To: freebsd-hardware@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BA71916A4DA for ; Mon, 28 Aug 2006 18:41:58 +0000 (UTC) (envelope-from j_guojun@lbl.gov) Received: from smtp106.sbc.mail.mud.yahoo.com (smtp106.sbc.mail.mud.yahoo.com [68.142.198.205]) by mx1.FreeBSD.org (Postfix) with SMTP id 67BF443D55 for ; Mon, 28 Aug 2006 18:41:57 +0000 (GMT) (envelope-from j_guojun@lbl.gov) Received: (qmail 31429 invoked from network); 28 Aug 2006 18:41:56 -0000 Received: from unknown (HELO ?192.168.2.10?) (jinmtb@sbcglobal.net@68.127.157.187 with plain) by smtp106.sbc.mail.mud.yahoo.com with SMTP; 28 Aug 2006 18:41:56 -0000 Message-ID: <44F33945.80609@lbl.gov> Date: Mon, 28 Aug 2006 11:43:17 -0700 From: "Jin Guojun [VFFS]" User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060317 X-Accept-Language: en, zh, zh-CN MIME-Version: 1.0 To: Peter Jeremy References: <44F22CB9.9040100@lbl.gov> <20060828095622.GC747@turion.vk2pj.dyndns.org> In-Reply-To: <20060828095622.GC747@turion.vk2pj.dyndns.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-performance@freebsd.org, hardware@freebsd.org Subject: Re: reduce interrupt rate for CD/DVD drive(r) X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Aug 2006 18:41:58 -0000 Peter Jeremy wrote: >On Sun, 2006-Aug-27 16:37:29 -0700, Jin Guojun [VFFS] wrote: > > >>I have difficulty to get CD/DVD write speed above 1.6MB/s (10x for CD, >>or 1.1x for DVD). >>The problem seems to be the interrupt rate is high (70-80% of CPU) for >>CD/DVD drive(r). >> >> > >Your drive is probably in PIO4 mode (due to there being bugs in the >UDMA implementation on many drives). Check hw.ata.atapi_dma and >"atacontrol mode acd0". You may find you can change to WDMA2 mode >which will significantly reduce the interrupt and CPU load. You will >need to do some experimenting with your drives to see what works for >you. > > Yes, this is the problem. hw.ata.atapi_dma=1 but 6.1-R configures acd0 to PIO4. "atacontrol mode acd0 WDMA2" makes acd0 into correct mode. Under 4.11-R, things are complicated. hw.ata.atapi_dma=1 makes boot process configure acd0 to UDMA2, but Tx (I/O) rate limits at 1.6 MB/s. atacontrol will not help. hw.ata.atapi_dma=0 makes boot process configure acd0 to PIO4, and initial Tx rate is 1.6 MB/s. However, use atacontrol to change mode to WDMA2, or UDMA2, or back to PIO4, Tx rate can go up for a single I/O session or more , but not stable. In random time, the Tx rate will drop back to 1.6 MB/s. Since 6.1-R works, I would not think we need to worry about 4.11-R for this issue. Thanks for the information, -Jin