Vramfs – GPU VRAM based file system for Linux
github.com
github.com
[1] Yesterday: TabFS – a browser extension that mounts the browser tabs as a filesystem, https://news.ycombinator.com/item?id=34847611
[2] The day before: Linux's SystemV Filesystem Support Being Orphaned, https://news.ycombinator.com/item?id=34818040
I didn't get picked up very much, though.
https://forums.gentoo.org/viewtopic-t-395234-start-0.html
https://www.pmenier.net/dotclear/docext/mtd/TIP_Use_memory_o...
Still online thanks to http://www.retroarchive.org/garbo/pc/memutil/index.html - a whopping 8KB zip archive, so about 30 seconds on my 2400bps modem (assuming V42 or MNP4)
Thank You!!
SBC.
Except if it has a very weak CPU which struggles with the load caused by compression, or power constraints, because mobile? But even then the compression is configurable.
I once used something similar on an old Thinkpad 60p with an ATI FireGL which had some 32bit Intel Centrino, and had only 3.25GB usable RAM from the 4GB. The FireGL had 256MB of which I only needed 2, and let it have 6, just to be on the safe side. The other 250MB I gave to compcache pointed to the device created by some (experimental?) blockdriver I can't remember anymore.
This wasn't automatic, didn't work on the first tries, and produced crashes. But was worth it once I had it right(¹), because that feeble thing ran much later into its limits. Noticeably. Not by some meaningless benchmarks.
(¹) much fiddling with many hexadecimal memory addresses and ranges, exclusions of the same in other configuration files, scattered over /etc/, mostly Xorg, but also other Drivers/PCI-Address spaces, to not have one BYTE of overlap, but also not wasting any ;-)
Edit: Skimming the two links phram rings a bell. It also ran Google Earth! Didn't really matter, on that GPU it probably did everything in software, and not something which the FireGL could deliver, or at least not at the times, with what MESA, XORG, DRI could do then with that card.
There are certain scenarios where this is okay but lots of scenarios where it is not (example: webgl)
Is this the IOMMU (which isn't generally supported, except on high end hardware [0]) or something else?
I think my GPU doesn't support IOMMU
[0] https://en.wikipedia.org/wiki/List_of_IOMMU-supporting_hardw...
Mantle/Vulkan/DX12/Metal was in a lot of ways a reaction to the thought 'well because of the ubiquitous MMUs in GPUs, user code can only crash their on GPU context, so it can't hurt to give them access to a lower level, video game console-esque API. At most they crash themselves and that was always allowed'.
> Is this the IOMMU (which isn't generally supported, except on high end hardware [0]) or something else?
No it's another MMU on the GPU itself. An IOMMU when combined with a GPU is a third MMU between the GPU and physical memory so you can give more or less raw GPU access to a VM securely.
my supposition was that a buffer of one program ending up in a VRAM associated with another program can only happen if there is no MMU, otherwise, what's the point
also: do you happen to know why do Qubes folks think that it's okay for two mutually untrusted programs run on the CPU, but can't accept that two untrusted programs can run on the GPU without eveasdropping on each other? even with IOMMU it seems.
it gives me the impression that safely sharing the GPU is a work in progress / not very secure
> my supposition was that a buffer of one program ending up in a VRAM associated with another program can only happen if there is no MMU, otherwise, what's the point
Because the compositor is running entirely in one GPU user context with access to the different windows. The different applications can't access each other, but the compositor can see all of their final display buffers.
> also: do you happen to know why do Qubes folks think that it's okay for two mutually untrusted programs run on the CPU, but can't accept that two untrusted programs can run on the GPU without eveasdropping on each other? even with IOMMU it seems.
> gives me the impression that safely sharing the GPU is a work in progress / not very secure
Defense in depth from not trusting MMU hardware that slightly changes it's interface to drivers every year and is different for every manufacturer, combined with the lack of documentation on said hardware.
An IOMMU doesn't really address the problem because it doesn't provide a way to split a GPU, only to give it as a whole to another context. So for instance an IOMMU doesn't enable the ability to access the GPU from multiple VMs simultaneously either.
The rest I leave as an exercise to the reader.
Unless you have hit the limit on how much "normal" RAM the current machine(s) can have/address, and/or you need extra memory for something now, etc.
Or, of course, you are just playing with something cool but ultimately pointless!
It would be interesting to implement this and a highly parallelizable GPU background data compression algorithm...
It could be zram (zram would be a good choice!), it could be something else, it all depends on what kind of performance/compression is desired, and how parallelizable the compression algorithm is...
What can I say? After much fiddling it worked stable, resulting in running into the limits of that POS much later. Extending its usability. Not that much, but noticeable.
Even Google Earth ran. Probably because it did anything in software anyways, on that combo of supported and exposed capabilities of the GPU at that time.
none /tmp tmpfs defaults,size=4G 0 0
It works like a charm. And in the worst case, if I run out of RAM anyway, it readily swaps out.You might consider these common mount options for a little extra security:
noexec,nosuid,nodev
(and potential headaches, to be fair)While /tmp is a great world-writable place, these restrict it from being home to executables/devices -- common sources of abuse
I picked these up through some compliance benchmarks, commonly applied to /tmp -- I'd exercise caution with these elsewhere, they're fairly restrictive
Or just skip that install to media stuff altogether, and run from some live distro booted into RAM, and running from there :-)
Nevertheless, neat!