Application-accessible nvram/cache for Linux?

Michael ODonnell michael.odonnell at comcast.net
Fri Jun 22 11:05:42 EDT 2007



>> >looks like a drive, you might be able to create a big file on
>> >it and mmap(2) it into system memory.
>>
>> I was thinking along those lines, too, but unless you can
>> force every write to the memory associated with the mmap'd
>> device to immediately trigger a (synchronous) flush to that
>> device the data will just get cached.
>
>I was thinking along the same lines too.  fsync()? "hdparm -W 0"?

Unless *every* write to the region in question automatically
triggers a synchronous flush this mmap() approach isn't the
same as direct-mapped RAM.  You could programmatically force
a flush after every write, but if you're willing to do that
then there's probably a lot better approaches than this one...
 


More information about the gnhlug-discuss mailing list