From owner-freebsd-hackers Fri Apr 18 04:26:22 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id EAA26595 for hackers-outgoing; Fri, 18 Apr 1997 04:26:22 -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 EAA26590 for ; Fri, 18 Apr 1997 04:26:18 -0700 (PDT) Received: (from dufault@localhost) by hda.hda.com (8.8.5/8.8.5) id HAA17117; Fri, 18 Apr 1997 07:12:56 -0400 (EDT) From: Peter Dufault Message-Id: <199704181112.HAA17117@hda.hda.com> Subject: Re: video capture driver interface to file system? In-Reply-To: <199704181021.MAA08439@labinfo.iet.unipi.it> from Luigi Rizzo at "Apr 18, 97 12:21:16 pm" To: luigi@labinfo.iet.unipi.it (Luigi Rizzo) Date: Fri, 18 Apr 1997 07:12:55 -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 > > Pre-allocate the file; pre-allocate the blocks of a file; pre-set > > up some control info for a transfer, mmap a set of blocks for the > > video card driver to dump data into; have the driver chain to the > > next block and interrupt you on each transfer, dump the video frames > > to the pre-allocated store. > > and probably, in addition to preallocation, make sure that your write() > calls are aligned to the FS/device blocksize otherwise (probably) each > write will be preceeded by a hidden read to take care of fragmentation ? Or you'll get an EIO somewhere along the line when you try to do the unaligned access. Amancio is trying to avoid the buffer copy inherent in going through the buffer cache - I'm waiting to see what his numbers are to see if he has to do that or it just hurts his sense of system utilization to not do it. About the only way I can think of easily doing what he wants is some method of getting back a list of block numbers corresponding to the blocks of a pre-allocated file and then doing a writev to the raw device. I'd want that file system to be a dedicated file system. You could probably hack up something based on the rf_ pages with that in mind. Peter -- Peter Dufault (dufault@hda.com) Realtime Machine Control and Simulation HD Associates, Inc. Voice: 508 433 6936