Application-accessible nvram/cache for Linux?

Thomas Charron twaffle at gmail.com
Fri Jun 22 14:24:56 EDT 2007


On 6/22/07, Michael ODonnell <michael.odonnell at comcast.net> wrote:
> > Worst case, you can open using O_DIRECT, which specifies direct
> > read/right access.  The only limitation really is the reads/writes
> > need to be aligned to the block size of the device.
> > Better would be to tell the OS it's OK to cache it, but a direct
> > write is needed.
> Negative.  Even though Paul didn't supply specifics it's still
> clear that for a mapped file to provide the same granularity and
> persistence as battery-backed RAM it would have to be updated
> after *each* write to memory.  Nothing that's yet been mentioned
> here will yield that sort of behavior.  I suppose it would be
> possible to simulate it by (say) marking the region of memory
> in question as Read Only and then having the SEGFAULT handler
> update the corresponding block on the device, but...  ick!

  I was taking about using it with a flash device.  If you utilize
O_DIRECT, your write will occur directly to the device, in this case,
written to flash.

-- 
-- Thomas


More information about the gnhlug-discuss mailing list