From owner-freebsd-scsi@FreeBSD.ORG Wed Apr 9 13:02:06 2003 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 09B0737B404 for ; Wed, 9 Apr 2003 13:02:04 -0700 (PDT) Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by mx1.FreeBSD.org (Postfix) with ESMTP id ADCBB43FB1 for ; Wed, 9 Apr 2003 13:02:03 -0700 (PDT) (envelope-from ken@panzer.kdm.org) Received: from panzer.kdm.org (localhost [127.0.0.1]) by panzer.kdm.org (8.12.6/8.12.5) with ESMTP id h39K1x8U012344; Wed, 9 Apr 2003 14:01:59 -0600 (MDT) (envelope-from ken@panzer.kdm.org) Received: (from ken@localhost) by panzer.kdm.org (8.12.6/8.12.5/Submit) id h39K1x1M012343; Wed, 9 Apr 2003 14:01:59 -0600 (MDT) (envelope-from ken) Date: Wed, 9 Apr 2003 14:01:58 -0600 From: "Kenneth D. Merry" To: "John S. Bucy" Message-ID: <20030409140158.A12245@panzer.kdm.org> References: <20030409194237.GI7726@catalepsy.ece.cmu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20030409194237.GI7726@catalepsy.ece.cmu.edu>; from bucy@ece.cmu.edu on Wed, Apr 09, 2003 at 03:42:38PM -0400 cc: freebsd-scsi@freebsd.org Subject: Re: cam: big transfers X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2003 20:02:06 -0000 On Wed, Apr 09, 2003 at 15:42:38 -0400, John S. Bucy wrote: > > Is it possible to do large (>MAXPHYS) bus transfers from a userland process > via cam? Not currently, no. You'd need to do some hacking around in cam_periph_mapmem() to allow for larger buffers. It actually checks against DFLTPHYS (64K) at the moment, not MAXPHYS, since some adapters (e.g. the Adaptec 1542) can't handle more than 17 S/G segments. If you just need larger buffers, and not performance, you could malloc a new kernel-space buffer to hold the user data. If you want performance as well, you could try writing your own routine that would map N pages from userland into the kernel, where N would be greater than MAXPHYS/PAGE_SIZE. If you just need say 256K transferred at a time, you could try bumping MAXPHYS to that and changing cam_periph_mapmem() to check against MAXPHYS as long as your hardware can support that. Ken -- Kenneth Merry ken@kdm.org