Date: Fri, 18 Apr 1997 09:38:46 -0700 (MST) From: Terry Lambert <terry@lambert.org> To: hasty@rah.star-gate.com (Amancio Hasty) Cc: msmith@atrad.adelaide.edu.au, terry@lambert.org, freebsd-hackers@freebsd.org Subject: Re: video capture driver interface to file system? Message-ID: <199704181638.JAA02106@phaeton.artisoft.com> In-Reply-To: <199704180304.UAA01268@rah.star-gate.com> from "Amancio Hasty" at Apr 17, 97 08:04:28 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> Not interested in using write nor any user level api. > > the video capture driver can place a digital image any where in memory or > on video cards (PCI to PCI transfer). > > For the purpose of this discussion, what I want to do is when I get a frame > in a buffer to pass a token to a file system routine to write the buffer > to disk. The object is to avoid unnecessarily copying the buffer. What about staging the buffer? Something like: 1) Map an aperture for the card 2) Capture into memory in a sub region of the aperture 3) Associate the memory as dirty buffers for a region of the file you want to write (set them up as if they are prefilled block buffers which have been written). 4) Initiate the dirty page flush (write to disk) 5) While waiting for completion, mark the region of the aperture busy, and capture into a different region to interleave the I/O 6) When the page flush completes, unmark the region so it can be reused This should make the save go as fast as the vnode_pager can write, and save an additional copy that would otherwise have to happen. I might be able to cobble this together, but you'd be much, much more assured that it would work if you could trap John Dyson into splitting the buffer/vnode association interface so you can get at it directly; my forrays into the VM code have been largely successful, but my failures are generally catastrophic when they occur (whole disk wiped, etc.). Regards, Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704181638.JAA02106>
