Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Apr 1997 07:07:40 -0400 (EDT)
From:      Peter Dufault <dufault@hda.com>
To:        hasty@rah.star-gate.com (Amancio Hasty)
Cc:        hackers@freebsd.org
Subject:   Re: video capture driver interface to file system?
Message-ID:  <199704191107.HAA21112@hda.hda.com>
In-Reply-To: <199704181915.MAA06203@rah.star-gate.com> from Amancio Hasty at "Apr 18, 97 12:15:58 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
> I get :
>  time dd if=/dev/zero of=/spare/test  bs=3456000 count=30
> 30+0 records in
> 30+0 records out
> 103680000 bytes transferred in 36.080174 secs (2873600 bytes/sec)
> 0.000u 5.297s 0:37.18 14.2% 78+9000k 8+1641io 6pf+0w
> The partition is on a 
> sd0: <SEAGATE ST15150W 0023> type 0 fixed SCSI 2
> and the adapter is a 2940w.

Well, that eliminates the simplest approach of through the file
system on your system.  I'd still do that first as a base line
since it will make it easy to debug the driver.

I read Mike Smith's suggestions.  I have another which I'd look at
before doing file I/O inside the kernel - that is only covering up
the context switch time, and I find it hard to accept that that is
going to make or break the application.  How about:

1. Driver mmap of buffers into the process address space;

2. An rtprio user process;

3. A synchronization token that can be read back saying which buffer
was loaded;

4. Raw I/O to a partition and your own clip storage management.

This will eliminate the copies and if it can be done at all I bet
it can be done this way.

You may want to time your double buffered raw I/O throughput and
see if you're going to be able to do this with your hardware.

After this is working you could start considering raw I/O to a file
system partition using pre-allocated files if needed - I'd still
do this part first.

I've been adding the POSIX 4 interface, and John Dyson is working
on async I/O.  The async I/O will make the data logger a bit more
straight forward - you'll have a few transfers out there and handle
the pending / completion handling in a standard way.

-- 
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?199704191107.HAA21112>