It's mainly used to protect drivers from each other. User space applications run in 32-bit flat mode. Although, I could theoretically create a new 32-bit executable format that can use segmentation. I once supported NE (16-bit Windows format), but I've not used it for a long time, so it is probably broken. However, this was a great format for discovering buffer errors in the application.xeyes wrote: Segmentation to protecting the kernel against (other parts) of itself? As even user space 64bit code bypasses segmentation?
My current (stable) FS does this too, but I've extended everything to 64-bits in the new FS that is based on server processes and that doesn't map disc buffers in linear kernel memory. Rather, the server processes will map metadata only to it's local userspace memory area. I will also memory map file data in user space to improve file-IO speed. The current implementation sends a buffer through a syscall, which is very inefficient for small reads.xeyes wrote:My FS stack uses 32b byte offset all the way down to disk level. So it is now limited not only to 4GB partitions, but also to partitions that are fully contained within the first 4GB of the disk. Enabling 'fast 64b mul/div' seems like a good way to support bigger disks.rdos wrote: The other argument was that FS drivers would benefit from using long mode, but I decided to use non-mapped physical addresses in the disc API instead, which avoids the problem of large disc caches consuming a lot of kernel memory.
In essence, this concept shows that it is possible to support large files & FS caches in 32-bit mode by using better design methods.
A bit of luck and a lot of determination. The bad thing is that I decided to abandon GCC and switched to OpenWatcom where I got commit access so I could fix the library in a much easier way than sending patches to the mailing lists.xeyes wrote:Agreed, stronglyrdos wrote:So, I see absolutely no reason why I would want to move to long mode at the moment...
btw. I've seen the rdos name many times in various configure.host files. Congratulations on getting into all of them! How did you make this happen? Does it have anything to do with the commercial background of the OS?