ultravioletrs / cocos

Cocos AI - Confidential Computing System for AI
https://ultraviolet.rs/cocos.html
Apache License 2.0
23 stars 9 forks source link

Feature: Bring back `tmpfs` and disable swap #263

Open drasko opened 6 days ago

drasko commented 6 days ago

Is your feature request related to a problem? Please describe.

No

Describe the feature you are requesting, as well as the possible use case(s) for it.

tmpfs is newer than ramfs, and can be set to take the whole RAM partition in fstab:

tmpfs   /mnt/tmpfs   tmpfs   defaults,size=100%   0  0

Additionally, Linux swap can be disabled, again in /etc/fstab:

/swapfile   none    swap    sw    0   0

Use something like this in Buildroot to allow that we use tmpfs, but that is capable taking whole available RAM, and with swap turned off (not to write anything to disk).

Indicate the importance of this feature to you.

Must-have

Anything else?

No response

drasko commented 6 days ago

Actually, swap should be disabled in Buildroot during the kernel compilation, I think with CONFIG_SWAP flag:

General Setup --->
  [ ] Support for paging of anonymous memory (swap)

Try if it possible to compile kernel with tmpfs, but with swap disabled already in Buildroot.