Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Dec 2000 08:47:04 -0700
From:      "Justin T. Gibbs" <gibbs@scsiguy.com>
To:        Nat Lanza <magus@cs.cmu.edu>
Cc:        freebsd-scsi@FreeBSD.ORG
Subject:   Re: Asynchronous commands for the passthrough driver 
Message-ID:  <200012231547.eBNFl4F59183@aslan.scsiguy.com>
In-Reply-To: Your message of "21 Dec 2000 20:45:02 EST." <uoc8zp9kz4x.fsf@hurlame.pdl.cs.cmu.edu> 

next in thread | previous in thread | raw e-mail | index | archive | help
>"Justin T. Gibbs" <gibbs@scsiguy.com> writes:
>
>> I chose to implement an interface capable of scheduling and retreiving
>> whole lists of I/O so a smart application could avoid several uesr/kernel
>> boundary trips for certain types of applications.
>
>My gut reaction is that the sort of SCSI commands you're generally
>going to want to queue up from a user application are going to be so
>slow anyway that the cost of going into the kernel doesn't matter much
>-- while being able to issue batches of requests is nice, it may be
>overkill.

If you are acting as a bridge, interrupt coalessing on one side or the
other may give you the oportunity to batch transactions on either the
enqueue or dequeue side.  Batching also allows you to more easily
test the maximum throughput of the I/O layer without becoming bogged
down by the CPU with a benchmark program.  I'm sure that there are
other situations where the interface will come in handy (RAID from
userland), but its not our job to devise all of the ways the interface
will be used, just make it as flexible as possible.

>> >Alternately, notification could be done through kqueue or maybe a
>> >poll() on the /dev/pass<n> device.
>> 
>> I suppose an application could have the need to poll on thousands of
>> pass fds, but not in the near term.  We can always add a kqueue interface
>> for agregating pass events at a later time giving the user the choice of
>> which one to use.
>
>I agree about poll(); applications aren't going to have many pass fds
>to deal with, and fundamentally the idea of polling for something
>other than read() and write() calls seems wrong to me.

I was advocating the use of poll().  Its been used for this kind of
interface several times before.

--
Justin


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-scsi" in the body of the message




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