I have this idea that will horrify most of you!

1. Create an mmap device driver. You ask it to a new file handle which you use 
to communicate about memory mapping.
2. If you want to mmap some file, you open it and write its file descriptor 
along with other parameters (file offset, base addr, size, mode, flags) to your 
mmap file handle.
3. The mmap driver sets up necessary page table entries but doesn't actually 
fetch any data before returning from the write.
4. It can asynchronously kick off io requests on your behalf and fixup page 
table entries as needed.
5. Page faults in the mmapped area are serviced by making appropriate 
read/write calls.
6. Flags can be used to indicate read-ahead or write-behind for typical serial 
access.
7. Similarly msync, munmap etc. can be implemented.

In a sneaky way this avoids the need for adding any mmap specific syscalls! But 
the underlying work would be mostly similar in either case.

The main benefits of mmap are reduced initial latency , "pay as you go" cost 
structure and ease of use. It is certainly more expensive than reading/writing 
the same amount of data directly from a program.

No idea how horrible a hack is needed to implement such a thing or even if it 
is possible at all but I had to share this ;-)

> On Jan 7, 2026, at 12:52 AM, [email protected] wrote:
> 
> On Tuesday, 6 January 2026, at 11:59 PM, Ron Minnich wrote:
>> So maybe a pure-ram venti, with a TiB or so of memory, could work? "disks 
>> are the work of the devil" -- jmk
> Of course, it would work, but imho it would be pointless. Why would anybody 
> use content-addressed storage on data, which are not on persistent memory?
> 
> Most of the code of a venti is concerned with the task making a backup easy.
> 9fans <https://9fans.topicbox.com/latest> / 9fans / see discussions 
> <https://9fans.topicbox.com/groups/9fans> + participants 
> <https://9fans.topicbox.com/groups/9fans/members> + delivery options 
> <https://9fans.topicbox.com/groups/9fans/subscription>Permalink 
> <https://9fans.topicbox.com/groups/9fans/Tf991997f4e7bb37e-M5b0ec55532fb3ef9b2466ae8>

------------------------------------------
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/Te8d7c6e48b5c075b-M79241f0580350c49710d5dde
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

Reply via email to