Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Aug 1999 15:34:17 +0300 (EEST)
From:      Vsevolod Lobko <seva@sevasoft.alex-ua.com>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   i386/13468: [PATCH] Low ATAPI performance with block devices (sys/i386/isa/atapi.c)
Message-ID:  <199908301234.PAA60807@sevasoft.alex-ua.com>

next in thread | raw e-mail | index | archive | help


>Number:         13468
>Category:       i386
>Synopsis:       [PATCH] incorrect wakeup argument in atapi_free()
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 30 05:40:01 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     Vsevolod Lobko
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
None
>Environment:

FreeBSD sevasoft.alex-ua.com 4.0-CURRENT FreeBSD 4.0-CURRENT #35: Wed Aug 25 21:24:34 EEST 1999     root@sevasoft.alex-ua.com:/usr/src/sys/compile/SEVASOFT  i386

>Description:

When using block devices system places many concurent commands for device

ATAPI driver have static buffer for 16 commands, and after 16 commands, 
atapi_alloc tsleep's on ata structure

atapi_free have wakeup, but with incorrect sleep addr &ata

>How-To-Repeat:

dd if=/dev/zero of=/dev/rwfd0 bs=2k count=100
and 
dd if=/dev/zero of=/dev/wfd0 bs=2k count=100

have very different transfer rates

>Fix:
	
Apply patch:

Index: atapi.c
===================================================================
RCS file: /home/free_rep/src/sys/i386/isa/atapi.c,v
retrieving revision 1.34
diff -u -r1.34 atapi.c
--- atapi.c	1999/04/19 18:44:16	1.34
+++ atapi.c	1999/08/30 12:22:41
@@ -507,11 +507,10 @@
 
 static void atapi_free (struct atapi *ata, struct atapicmd *ac)
 {
-	if (! ata->free)
-		wakeup ((caddr_t)&ata);
 	ac->busy = 0;
 	ac->next = ata->free;
 	ata->free = ac;
+	wakeup ((caddr_t)ata);
 }
 
 /*


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199908301234.PAA60807>