From owner-freebsd-hackers Sat Apr 19 04:20:33 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id EAA10204 for hackers-outgoing; Sat, 19 Apr 1997 04:20:33 -0700 (PDT) Received: from hda.hda.com (hda-bicnet.bicnet.net [207.198.1.121]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id EAA10197 for ; Sat, 19 Apr 1997 04:20:29 -0700 (PDT) Received: (from dufault@localhost) by hda.hda.com (8.8.5/8.8.5) id HAA21112; Sat, 19 Apr 1997 07:07:40 -0400 (EDT) From: Peter Dufault Message-Id: <199704191107.HAA21112@hda.hda.com> Subject: Re: video capture driver interface to file system? In-Reply-To: <199704181915.MAA06203@rah.star-gate.com> from Amancio Hasty at "Apr 18, 97 12:15:58 pm" To: hasty@rah.star-gate.com (Amancio Hasty) Date: Sat, 19 Apr 1997 07:07:40 -0400 (EDT) Cc: hackers@freebsd.org X-Mailer: ELM [version 2.4ME+ PL25 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > 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: 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