3 ms·
So mmap() the file?
by nly 8y ago
So mmap() the file?
- ninkendo 8y agoIn other words, don't treat it as a file any more?
- JdeBP 8y agoOnly if one also opines that memory mapping is a thing that one cannot generally do to files. (-:
- zbentley 8y agoIf we posit that memory mapping is a thing that one can generally do to files, then a ton of other abstractions break: how do you memory map a socket? Not a fixed piece of a socket's buffer, but communication on the socket itself?
- theoh 8y agoSee my other comment about Plan 9. You can certainly organize to be able to mmap a file that represents a framebuffer, but that has nothing to do with the comment I was replying to. And it is exactly the kind of thing Torvalds is objecting to, quite reasonably: if the framebuffer device file exists only to be mmapped, there's no reason for it to exist as a file. Plan 9 used the file metaphor to achieve things like network transparency, which is a situation that precludes the use of mmap. (Though you could organize an OS to make it work that way.) If you just want to get access to a framebuffer as a memory-mapped resource, old style, there's no good reason for files to be involved.