Date: Fri, 18 Apr 1997 07:12:55 -0400 (EDT) From: Peter Dufault <dufault@hda.com> To: luigi@labinfo.iet.unipi.it (Luigi Rizzo) Cc: hackers@freebsd.org Subject: Re: video capture driver interface to file system? Message-ID: <199704181112.HAA17117@hda.hda.com> In-Reply-To: <199704181021.MAA08439@labinfo.iet.unipi.it> from Luigi Rizzo at "Apr 18, 97 12:21:16 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
> > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704181112.HAA17117>
