Application-accessible nvram/cache for Linux?
Thomas Charron
twaffle at gmail.com
Fri Jun 22 11:02:48 EDT 2007
On 6/22/07, VirginSnow at vfemail.net <VirginSnow at vfemail.net> wrote:
> > From: Bill McGonigle <bill at bfccomputing.com>
> > Date: Fri, 22 Jun 2007 10:01:46 -0400
> > Cc: gnhlug-discuss at gnhlug.org
> > On Jun 21, 2007, at 16:38, Paul Lussier wrote:
> > > I don't think they want a drive, they want something like a
> > > battery-backed cache but accessible from user space.
> > Somebody who's done systems programming more recently than me, please
> > speak up, but if you do find a suitable device that looks like a
> > drive, you might be able to create a big file on it and mmap(2) it
> > into system memory.
> Actually, that probably won't work because the kernel caches file I/O
> before writing to disk. It *might* work if the device uses the SCSI
> subsystem and is mounted -o sync. If what I've heard is true, the
> kernel only ever flushes IDE buffers on shutdown. (Can anyone verify
> this?)
Negative, you just have to know what your doing. You can explicitly
tell the kernel 'what to do' with a file using madvise() or
posix_fadvise(). The kernel will listen to your advice based on how
your using it. Granted, it doesn't *HAVE* to, but it does.
--
-- Thomas
More information about the gnhlug-discuss
mailing list