From owner-cvs-all Mon Mar 11 13:37:11 2002 Delivered-To: cvs-all@freebsd.org Received: from mail6.speakeasy.net (mail6.speakeasy.net [216.254.0.206]) by hub.freebsd.org (Postfix) with ESMTP id 4CA7F37B41A for ; Mon, 11 Mar 2002 13:37:00 -0800 (PST) Received: (qmail 19080 invoked from network); 11 Mar 2002 21:36:58 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail6.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 11 Mar 2002 21:36:58 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.11.6/8.11.6) with ESMTP id g2BLb1v23465; Mon, 11 Mar 2002 16:37:03 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200203112104.g2BL4Xm01754@freefall.freebsd.org> Date: Mon, 11 Mar 2002 16:36:41 -0500 (EST) From: John Baldwin To: SXren Schmidt Subject: RE: cvs commit: src/sys/dev/ata ata-all.c ata-all.h ata-disk.c Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 <>< 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