From owner-freebsd-scsi@FreeBSD.ORG Fri Jun 1 03:41:24 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 8D96316A400; Fri, 1 Jun 2007 03:41:24 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 463DF13C465; Fri, 1 Jun 2007 03:41:24 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.samsco.home (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.8/8.13.8) with ESMTP id l513fLu4079537; Thu, 31 May 2007 21:41:21 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <465F955E.7050103@samsco.org> Date: Thu, 31 May 2007 21:41:18 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.2pre) Gecko/20070111 SeaMonkey/1.1 MIME-Version: 1.0 To: Hidetoshi Shimokawa References: <86tztspdil.wl%simokawa@FreeBSD.ORG> In-Reply-To: <86tztspdil.wl%simokawa@FreeBSD.ORG> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (pooker.samsco.org [168.103.85.57]); Thu, 31 May 2007 21:41:21 -0600 (MDT) X-Spam-Status: No, score=-1.4 required=5.5 tests=ALL_TRUSTED autolearn=failed version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: freebsd-scsi@freebsd.org Subject: Re: 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:41:24 -0000 Hidetoshi Shimokawa wrote: > 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.. I'm unclear on how GEOM would fix this. Also, scsi targets aren't always DA devices. I dedicated scsi_da_target device that is backed by GEOM might be interesting, though. Even more interesting would be a direct DMA method that required no KVA mappings for the data. Scott