scsi_target with multiple luns

Hidetoshi Shimokawa simokawa at FreeBSD.ORG
Fri Jun 1 06:50:27 UTC 2007


OK. Now I understand that they are prototypes...
Actually,  sbp_targ(4) is the hardest part to lock the firewire stack.

On 6/1/07, Matthew Jacob <lydianconcepts at gmail.com> wrote:
> Yes. None of the extant stuff is deployable as solid solution without reworking.
>
> On 5/31/07, Hidetoshi Shimokawa <simokawa at freebsd.org> wrote:
> > Yes, scsi_target(8) is an example.
> > But the problem I described is actually a problem of targ(4)  (scsi_target.c).
> > The userland can do nothing about this problem.
> > Or do you mean targ(4) is also an example?
> >
> > On 6/1/07, Matthew Jacob <lydianconcepts at gmail.com> wrote:
> > > Remember that scsi_target is an example. A fine example, but an
> > > example. Having a single user process that can be shot and killed, no
> > > matter how multithreaded or AIO'd, is not necessarily the wisest
> > > choice for building a target device.
> > >
> > >
> > > On 5/31/07, Scott Long <scottl at samsco.org> wrote:
> > > > 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
> > > >
> > > > _______________________________________________
> > > > freebsd-scsi at freebsd.org mailing list
> > > > http://lists.freebsd.org/mailman/listinfo/freebsd-scsi
> > > > To unsubscribe, send any mail to "freebsd-scsi-unsubscribe at freebsd.org"
> > > >
> > >
> > >
> >
> >
> > --
> > /\ Hidetoshi Shimokawa
> > \/  simokawa at FreeBSD.ORG
> >
>
>


-- 
/\ Hidetoshi Shimokawa
\/  simokawa at FreeBSD.ORG


More information about the freebsd-scsi mailing list