Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Mar 2002 16:36:41 -0500 (EST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        SXren Schmidt <sos@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org
Subject:   RE: cvs commit: src/sys/dev/ata ata-all.c ata-all.h ata-disk.c
Message-ID:  <XFMail.20020311163641.jhb@FreeBSD.org>
In-Reply-To: <200203112104.g2BL4Xm01754@freefall.freebsd.org>

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

On 11-Mar-2002 SXren Schmidt wrote:
> sos         2002/03/11 13:04:32 PST
> 
>   Modified files:
>     sys/dev/ata          ata-all.c ata-all.h ata-disk.c ata-raid.c 
>                          atapi-all.c atapi-cd.c atapi-fd.c 
>                          atapi-tape.c 
>   Log:
>   Add new support for locking an ATA channel and use that throughout
>   the ATA/ATAPI driver. This solves the concurrency problem with
>   the new GEOM code, and also cuts a good deal of the patch size
>   in the upcoming MFC.

Hmm, could you try using a mutex or sx lock instead of using atomic operations?
You aren't using any memory barriers, thus this won't work on SMP sparc64,
ia64, Pentium III+, or Alpha EV6+ machines.  Also, the use of
ATA_FORCELOCK_CH()in ata_reinit() looks very evil as you are just assuming that
no threads on any other CPU's are messing with the channel at that point in
time.

-- 

John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

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




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