From owner-freebsd-scsi@FreeBSD.ORG Sun Dec 7 19:46:18 2008 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C72E1065718 for ; Sun, 7 Dec 2008 19:46:18 +0000 (UTC) (envelope-from morganw@chemikals.org) Received: from warped.bluecherry.net (unknown [IPv6:2001:440:eeee:fffb::2]) by mx1.freebsd.org (Postfix) with ESMTP id 099068FC18 for ; Sun, 7 Dec 2008 19:46:18 +0000 (UTC) (envelope-from morganw@chemikals.org) Received: from volatile.chemikals.org (unknown [74.193.182.107]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by warped.bluecherry.net (Postfix) with ESMTPSA id E293584CD795 for ; Sun, 7 Dec 2008 13:46:14 -0600 (CST) Received: from localhost (morganw@localhost [127.0.0.1]) by volatile.chemikals.org (8.14.3/8.14.3) with ESMTP id mB7JjjCN091181 for ; Sun, 7 Dec 2008 13:45:55 -0600 (CST) (envelope-from morganw@chemikals.org) Date: Sun, 7 Dec 2008 13:45:45 -0600 (CST) From: Wes Morgan To: freebsd-scsi@freebsd.org Message-ID: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII Subject: CAM documentation X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Dec 2008 19:46:18 -0000 I'm looking at porting a linux program that uses their generic cdrom routines to basically pass through commands to the cd. From what I gather, the way to do this in FreeBSD is using CAM and possibly ATAPICAM. However, I can't find much documentation on the CAM system other than the man pages and the code for camcontrol. Is there any in-depth API documentation available? Thanks! From owner-freebsd-scsi@FreeBSD.ORG Mon Dec 8 04:29:07 2008 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11CF91065670 for ; Mon, 8 Dec 2008 04:29:07 +0000 (UTC) (envelope-from chuck@tuffli.net) Received: from mail-qy0-f18.google.com (mail-qy0-f18.google.com [209.85.221.18]) by mx1.freebsd.org (Postfix) with ESMTP id C64F78FC1E for ; Mon, 8 Dec 2008 04:29:06 +0000 (UTC) (envelope-from chuck@tuffli.net) Received: by qyk11 with SMTP id 11so1140282qyk.19 for ; Sun, 07 Dec 2008 20:29:04 -0800 (PST) Received: by 10.215.39.15 with SMTP id r15mr1860106qaj.99.1228709287101; Sun, 07 Dec 2008 20:08:07 -0800 (PST) Received: from ?192.168.2.102? ([66.60.188.9]) by mx.google.com with ESMTPS id 26sm13399257qwa.50.2008.12.07.20.08.05 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 07 Dec 2008 20:08:06 -0800 (PST) In-Reply-To: References: Mime-Version: 1.0 (Apple Message framework v753.1) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Chuck Tuffli Date: Sun, 7 Dec 2008 20:08:25 -0800 To: Wes Morgan X-Mailer: Apple Mail (2.753.1) Cc: freebsd-scsi@freebsd.org Subject: Re: CAM documentation X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 04:29:07 -0000 On Dec 7, 2008, at 11:45 AM, Wes Morgan wrote: > I'm looking at porting a linux program that uses their generic > cdrom routines to basically pass through commands to the cd. From > what I gather, the way to do this in FreeBSD is using CAM and > possibly ATAPICAM. However, I can't find much documentation on the > CAM system other than the man pages and the code for camcontrol. Is > there any in-depth API documentation available? http://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/scsi.html From owner-freebsd-scsi@FreeBSD.ORG Mon Dec 8 11:07:02 2008 Return-Path: Delivered-To: freebsd-scsi@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC93D106564A for ; Mon, 8 Dec 2008 11:07:02 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C9CAB8FC28 for ; Mon, 8 Dec 2008 11:07:02 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id mB8B72kx014394 for ; Mon, 8 Dec 2008 11:07:02 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id mB8B72aV014390 for freebsd-scsi@FreeBSD.org; Mon, 8 Dec 2008 11:07:02 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 8 Dec 2008 11:07:02 GMT Message-Id: <200812081107.mB8B72aV014390@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-scsi@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-scsi@FreeBSD.org X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 11:07:02 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/128452 scsi [sa] [panic] Accessing SCSI tape drive randomly crashe o kern/128245 scsi [scsi] "inquiry data fails comparison at DV1 step" [re o kern/127927 scsi [isp] isp(4) target driver crashes kernel when set up o kern/126866 scsi [isp] [panic] kernel panic on card initialization o kern/124667 scsi [amd] [panic] FreeBSD-7 kernel page faults at amd-scsi o kern/123674 scsi [ahc] ahc driver dumping o kern/123666 scsi [aac] attach fails with Adaptec SAS RAID 3805 controll o sparc/121676 scsi [iscsi] iscontrol do not connect iscsi-target on sparc o kern/120487 scsi [sg] scsi_sg incompatible with scanners o kern/120247 scsi [mpt] FreeBSD 6.3 and LSI Logic 1030 = only 3.300MB/s o kern/119668 scsi [cam] [patch] certain errors are too verbose comparing o kern/114597 scsi [sym] System hangs at SCSI bus reset with dual HBAs o kern/110847 scsi [ahd] Tyan U320 onboard problem with more than 3 disks o kern/99954 scsi [ahc] reading from DVD failes on 6.x [regression] o kern/94838 scsi Kernel panic while mounting SD card with lock switch o o kern/92798 scsi [ahc] SCSI problem with timeouts o kern/90282 scsi [sym] SCSI bus resets cause loss of ch device o kern/76178 scsi [ahd] Problem with ahd and large SCSI Raid system o kern/74627 scsi [ahc] [hang] Adaptec 2940U2W Can't boot 5.3 s kern/61165 scsi [panic] kernel page fault after calling cam_send_ccb o kern/60641 scsi [sym] Sporadic SCSI bus resets with 53C810 under load o kern/60598 scsi wire down of scsi devices conflicts with config s kern/57398 scsi [mly] Current fails to install on mly(4) based RAID di o kern/52638 scsi [panic] SCSI U320 on SMP server won't run faster than o kern/44587 scsi dev/dpt/dpt.h is missing defines required for DPT_HAND o kern/40895 scsi wierd kernel / device driver bug o kern/39388 scsi ncr/sym drivers fail with 53c810 and more than 256MB m o kern/38828 scsi [dpt] [request] DPT PM2012B/90 doesn't work o kern/35234 scsi World access to /dev/pass? (for scanner) requires acce 29 problems total. From owner-freebsd-scsi@FreeBSD.ORG Thu Dec 11 13:38:07 2008 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D9891065676 for ; Thu, 11 Dec 2008 13:38:07 +0000 (UTC) (envelope-from bra@fsn.hu) Received: from people.fsn.hu (people.fsn.hu [195.228.252.137]) by mx1.freebsd.org (Postfix) with ESMTP id E7A4A8FC12 for ; Thu, 11 Dec 2008 13:38:06 +0000 (UTC) (envelope-from bra@fsn.hu) Received: from [172.27.51.1] (fw.axelero.hu [195.228.243.120]) by people.fsn.hu (Postfix) with ESMTP id 54A2616A1F1 for ; Thu, 11 Dec 2008 14:22:17 +0100 (CET) Message-ID: <49411408.2070809@fsn.hu> Date: Thu, 11 Dec 2008 14:22:16 +0100 From: Attila Nagy User-Agent: Thunderbird 2.0.0.18 (X11/20081125) MIME-Version: 1.0 To: freebsd-scsi@freebsd.org X-Stationery: 0.4.8.11 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (people.fsn.hu [0.0.0.0]); Thu, 11 Dec 2008 14:22:17 +0100 (CET) Subject: FreeBSD -CURRENT regression (only 3.3 MBps on ahc) X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 13:38:07 -0000 Hello, I have a server, which has two SCSI controllers, one (two channels) for the inner disks and one for a directly attached storage (a Promise RM8000 box, which has 8 ATA drives). Because I use ZFS on the RM8000, I've switched to -CURRENT some time ago and noticed that the array's speed fell sharply. Until now I didn't have the time to investigate it further, but now I found out the following: - in the controller's BIOS the device is recognized as U160 (16 bit wide, 80 MHz) - in dmesg the device can be seen as: ahc2: port 0x2800-0x28ff mem 0xfea90000-0xfea90fff irq 31 at device 8.0 on pci1 da2 at ahc2 bus 0 target 0 lun 0 da2: Fixed Direct Access SCSI-3 device da2: 3.300MB/s transfers da2: 1525878MB (3124999168 512 byte sectors: 255H 63S/T 194522C) The inner disks are OK: da0: 160.000MB/s transfers (80.000MHz DT, offset 63, 16bit) When I issue a dd, I get exactly 3.3 MBps transfer rates: dd if=/dev/da2 of=/dev/null bs=1M ^C33+0 records in 33+0 records out 34603008 bytes transferred in 10.130446 secs (3415744 bytes/sec) Which is worse than that is a parallel read to eight (array as a JBOD, each disk as a RAID0 array) disks: L(q) ops/s r/s kBps ms/r w/s kBps ms/w %busy Name 1 3 3 383 323.9 0 0 0.0 96.9| da2 1 3 3 383 323.9 0 0 0.0 96.9| da3 1 3 3 383 323.9 0 0 0.0 96.9| da4 1 3 3 383 323.9 0 0 0.0 96.9| da5 1 3 3 383 323.7 0 0 0.0 96.8| da6 1 3 3 383 323.9 0 0 0.0 96.9| da7 1 3 3 383 323.9 0 0 0.0 96.9| da8 1 3 3 383 323.8 0 0 0.0 96.8| da9 It makes the array pretty useless... However, when I do a: camcontrol negotiate da2 -a -W 16 Current Parameters: (pass3:ahc2:0:0:0): sync parameter: 0 (pass3:ahc2:0:0:0): offset: 0 (pass3:ahc2:0:0:0): bus width: 8 bits (pass3:ahc2:0:0:0): disconnection is disabled (pass3:ahc2:0:0:0): tagged queueing is disabled New Parameters: (pass3:ahc2:0:0:0): sync parameter: 0 (pass3:ahc2:0:0:0): offset: 0 (pass3:ahc2:0:0:0): bus width: 16 bits (pass3:ahc2:0:0:0): disconnection is disabled (pass3:ahc2:0:0:0): tagged queueing is disabled (TCQ, disconnection is disabled in the BIOS, because that was my first idea) After this, I get: dd if=/dev/da2 of=/dev/null bs=1M ^C76+0 records in 76+0 records out 79691776 bytes transferred in 11.871042 secs (6713124 bytes/sec) and: camcontrol inquiry da2 pass3: Fixed Direct Access SCSI-3 device pass3: Serial Number pass3: 6.600MB/s transfers (16bit) The transfer rate has doubled. I have tried to do a: camcontrol negotiate da2 -a -R 80 -W 16 Current Parameters: (pass3:ahc2:0:0:0): sync parameter: 0 (pass3:ahc2:0:0:0): offset: 0 (pass3:ahc2:0:0:0): bus width: 16 bits (pass3:ahc2:0:0:0): disconnection is disabled (pass3:ahc2:0:0:0): tagged queueing is disabled New Parameters: (pass3:ahc2:0:0:0): sync parameter: 0 (pass3:ahc2:0:0:0): offset: 0 (pass3:ahc2:0:0:0): bus width: 16 bits (pass3:ahc2:0:0:0): disconnection is disabled (pass3:ahc2:0:0:0): tagged queueing is disabled but without any effect. I can't show a dmesg now from the previous kernels, but this server could achieve 20-30 MBps from that array with FreeBSD 5,6 (when it went out of production) and certainly not just 3.3 MBps with 7-STABLE until a point. I have had a: @(#)FreeBSD 7.0-STABLE #4: Mon Jun 9 12:21:13 CEST 2008 kernel which worked reasonably well (performance wise, ZFS was unstable) and I first noticed the slowdowns when I've upgraded from that, first in the line of STABLE, then to CURRENT. Any ideas about that? Thanks,