>> rather than using disk buffer cache for file data
I don’t think any modern OS uses this outdated design.
Stop thinking, Max,and, instead, start reading books/articles/etc,as well as looking at the code - this will save you quite a few silly statements that you seem to be fond of making…
Linux caches file data in physical pages. Same as Windows.
Correct. However, once you are so desperate to"think", then try to do it properly, at least once in a while. Let’s say you want to read a page from the file. First of all, FSD has to translate it to the disk address. However, after it has been already done once, what is the point of going to FSD every time you want to read or flush this page??? This is what disk buffer cache is for - FSD translates a page
to its disk address and inserts it into a buffer cache. At this point, memory management layer can simply check whether a page is in the buffer cache, and, if it is, read or flush it using disk address that is associated with it (this association had been earlier established by FSD) without ever having to go to FSD again. This is how normal OSes do things - it is called “disk buffer cache”. Unlike the normal OS, Windows does not have any, and, instead, uses some dubious “Cache Manager” that handles cache on per-file basis and goes to the FSD every time it has to read or flush a page, and does so recursively upon the request of the same FSD that,in turn, does it upon MM’s request…
In both OSes, the same pages are used for mmap().
True, but, as you can see, it is done differently…
Linux kernel has it, under the name of “event queue” or such. Is it exposed to user mode?
Is aio using it?
Not the one that C library implements - you need libaio for this. The “only” question is who is going to implement it in the kernel- historically, the only one who ever made use of it is /usb/gadget. This API had been around for a decade, had been completely ignored by everyone, and finally seems to have been deprecated (at least kick_iocb() has been gone since version 3.10)…
Anton Bassov