Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Jan 1997 06:10:02 -0500 (EST)
From:      Peter Dufault <dufault@hda.com>
To:        joerg_wunsch@uriah.heep.sax.de
Cc:        freebsd-scsi@FreeBSD.org
Subject:   Re: XXXminpys question
Message-ID:  <199701301110.GAA10436@hda.hda.com>
In-Reply-To: <Mutt.19970130102014.j@uriah.heep.sax.de> from J Wunsch at "Jan 30, 97 10:20:14 am"

next in thread | previous in thread | raw e-mail | index | archive | help
> As Julian Elischer wrote:
> 
> > > The SCSI minphys routines seem to be called _in addition_ to the
> > > physio(9) minphys handling, to make the mess complete (once per call
> > > to scsi_strategy(), in sys/scsi/scsi_driver.c).
> > 
> > exactly..
> > the adapter or device might have more restrictions than 
> > hte rest of the kernel, so they need a say.
> 
> The adapters _are_ the reason for a minphys, so there should only be
> one at all.  We should probably add it to the cdevsw entries.  It can
> default to minphys (64 KB).

You still want an overall system minphys to prevent a rogue driver / rogue
dd from crashing the system.  It is the maximum amount you're willing to
guarantee to lock down for a raw transfer.  The physio loop is correct - 
if you vectored through a "scsiwrite" instead of a "rawwrite" it could
work with the current setup without the redundant minphys in the scsi code.

I've always assumed that minphys was supposed to be in the cdevsw but
the way it is in FreeBSD is the way it is in 4.4.

This is for raw transfers - I'm not sure where "minphysing" is / should be
done for block transfers in the case of the clustering of transfers.

Finally, I think this hooks in with what Julian was asking the
other day about scatter/gather lists hooked off the bufs (but I'm
vague about this part).  You call minphys before locking down the
transfer, and so minphys will have to generate the scatter/gather
list to figure out a real minphys, and then I guess the kernel must
redo some of the work for the locking down.

-- 
Peter Dufault (dufault@hda.com)   Realtime Machine Control and Simulation
HD Associates, Inc.               Voice: 508 433 6936



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701301110.GAA10436>