logoalt Hacker News

3formtoday at 10:21 AM1 replyview on HN

Except swap is, like, opposite of RAM disk.

That said, still an nice and fun concept. Though caching got better since I assume :)


Replies

lloekitoday at 12:06 PM

RAM disk is, like, the brd module on Linux, which allocates and exposes a /dev/ram0 block device.

From the project description this looks like it, exposing a raw block device backed by VRAM (with some trip through the nbd protocol, but that's an implementation detail to have it in userland, it could just as well have been implemented kernel side).

It's just that the usage of this mem-backed block device is different than the thing of yore (copy HD or floppy into RAM)

The more frequent alternative to brd, tmpfs, skips the block device part and does a filesystem directly. I wonder if it could be made so that it's swap directly and skip the block device part entirely like tmpfs.