From sime@logos.hr  Mon Apr 11 08:44:23 2005
Return-Path: <sime@logos.hr>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 7B91B16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 11 Apr 2005 08:44:23 +0000 (GMT)
Received: from mail.logos.hr (gates.logos.hr [213.149.47.2])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 0E5DA43D3F
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 11 Apr 2005 08:44:22 +0000 (GMT)
	(envelope-from sime@logos.hr)
Received: from localhost (localhost.logos.hr [127.0.0.1])
	by mail.logos.hr (Postfix) with ESMTP id C869326D094
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 11 Apr 2005 10:44:19 +0200 (CEST)
Received: from mail.logos.hr ([127.0.0.1])
 by localhost (mail.logos.hr [127.0.0.1]) (amavisd-new, port 10024) with LMTP
 id 31684-02-3 for <FreeBSD-gnats-submit@freebsd.org>;
 Mon, 11 Apr 2005 10:43:53 +0200 (CEST)
Received: by mail.logos.hr (Postfix, from userid 34062)
	id 3D9E326D05D; Mon, 11 Apr 2005 10:43:53 +0200 (CEST)
Message-Id: <20050411084353.3D9E326D05D@mail.logos.hr>
Date: Mon, 11 Apr 2005 10:43:53 +0200 (CEST)
From: Simun Mikecin <simun.mikecin@logos.hr>
Reply-To: Simun Mikecin <simun.mikecin@logos.hr>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: ata: hw.ata.atapi_dma=1 reduces HDD writing transfer rate
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         79783
>Category:       kern
>Synopsis:       [ata] hw.ata.atapi_dma=1 reduces HDD writing transfer rate
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 11 08:50:22 GMT 2005
>Closed-Date:    
>Last-Modified:  Tue May 12 04:33:02 UTC 2009
>Originator:     Simun Mikecin
>Release:        FreeBSD 5.4-STABLE i386
>Organization:
>Environment:
System: FreeBSD data.home.hr 5.4-STABLE FreeBSD 5.4-STABLE #0: Wed Apr 6 20:26:25 CEST 2005 root@data.home.hr:/var/obj/usr/src/sys/DATA i386

Reproduced on two machines both using 5.4-STABLE. Tried with GENERIC and
custom kernel.

#1) Laptop Toshiba Qosmio F10 (Centrino, Intel 855/ICH4 chipset) with:
 atapci0: <Intel ICH4 UDMA100 controller> port 0xbfa0-0xbfaf,0x376,0x170-0x177,0x3f6,0x1f0-0x1f77 irq 11 at device 31.1 on pci0
 ad0: 57137MB <TOSHIBA MK6026GAX/PA203H> [116088/16/63] atata0-master UDMA100
 acd0: DVDR <MATSHITADVD-RAM UJ-820S/1.00> at ata1-master UDMA33

#2) Pentium 4 desktop PC, Intel 875P/ICH5 chipset with:
 atapci0: <Intel ICH5 UDMA100 controller> port 0xf000-0xf00f,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 31.1 on pci0
 ad0: 176700MB <IC35L180AVV207-1/V26OA63A> [359010/16/63] at ata0-master UDMA100
 acd0: DVDROM <Pioneer DVD-ROM ATAPIModel DVD-120S/1.01> at ata0-slave UDMA66
 acd1: DVDR <PIONEER DVD-RW DVR-106D/1.07> at ata1-master UDMA33
	
>Description:
 When hw.ata.atapi_dma is set to 1, HDD writing transfer rate reduces to 16MB/s.
 Reading is not affected. Optical drives are not being used while testing. Using:
	sync && dd if=/dev/zero of=foo bs=1m count=100
 results are:

 Machine #1) with hw.ata.atapi_dma=1:
  104857600 bytes transferred in 6.521342 secs (16079144 bytes/sec)

 Machine #1) with hw.ata.atapi_dma=0:
  104857600 bytes transferred in 3.586123 secs (29239823 bytes/sec)

 Machine #2) with hw.ata.atapi_dma=1:
  104857600 bytes transferred in 6.532039 secs (16052813 bytes/sec)

 Machine #2) with hw.ata.atapi_dma=0:
  104857600 bytes transferred in 2.160149 secs (48541835 bytes/sec)

	
>How-To-Repeat:
 Try:
	sync && dd if=/dev/zero of=foo bs=1m count=100

>Fix:
  Set hw.ata.atapi_dma to 0. But that could break writing to optical media.
	


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->sos 
Responsible-Changed-By: netchild 
Responsible-Changed-When: Sun Dec 10 19:53:51 UTC 2006 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=79783 
Responsible-Changed-From-To: sos->freebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Tue May 12 04:32:44 UTC 2009 
Responsible-Changed-Why:  
sos@ is not actively working on ATA-related PRs. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=79783 
>Unformatted:
