From owner-freebsd-scsi@FreeBSD.ORG Fri Jun 1 03:20:49 2007 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 213B116A477 for ; Fri, 1 Jun 2007 03:20:49 +0000 (UTC) (envelope-from simokawa@freebsd.org) Received: from mail1.ecc.u-tokyo.ac.jp (mail1.ecc.u-tokyo.ac.jp [133.11.50.203]) by mx1.freebsd.org (Postfix) with ESMTP id DC7C213C487 for ; Fri, 1 Jun 2007 03:20:48 +0000 (UTC) (envelope-from simokawa@freebsd.org) Received: from spam002.ecc.u-tokyo.ac.jp (spam002.ecc.u-tokyo.ac.jp [133.11.50.195]) by mail1.ecc.u-tokyo.ac.jp (Postfix) with ESMTP id 445DD10079 for ; Fri, 1 Jun 2007 12:20:48 +0900 (JST) Received: from maru5.nunu.org (157.82.169.72 [157.82.169.72]) by spam002.ecc.u-tokyo.ac.jp (SpamBlock.pst 3.4.97) with ESMTP id <86tztspdil.wl%simokawa@FreeBSD.ORG> for ; Fri, 1 Jun 2007 12:19:47 +0900 Date: Fri, 01 Jun 2007 12:19:46 +0900 Message-ID: <86tztspdil.wl%simokawa@FreeBSD.ORG> From: Hidetoshi Shimokawa To: freebsd-scsi@freebsd.org User-Agent: Wanderlust/2.15.2 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.0.50 (i386-unknown-freebsd5.4) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-IP: 157.82.169.72 X-FROM-DOMAIN: freebsd.org X-FROM-EMAIL: simokawa@freebsd.org Subject: scsi_target with multiple luns 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: Fri, 01 Jun 2007 03:20:49 -0000 I have not fully analyzed the problem but I'll describe it just for a note. I'd like to ask maintainers of scsi_target for further analysis. I experiance a problem with small number(1) of simq and multiple scsi_target(8) instances. As far as I understand, the following situation could occur under a fairly heavy load. 1. process A send a request -> cam send to sim 2. process B send a request -> blocked because the simq is full 3. the request of process A is finished (in the context of process A) 4. cam/scsi_target tries to send the request of process B. But the mapped memory is of process A, and scsi_target send wrong ccb to sim. Maybe, we should rewrite scsi_target in kernel space with GEOM support.. /\ Hidetoshi Shimokawa \/ simokawa@FreeBSD.ORG