Messages in this thread | ![/](/images/icornerl.gif) | | From | "Kirill A. Shutemov" <> | Subject | Re: remap_file_pages() use | Date | Mon, 26 May 2014 17:16:55 +0300 (EEST) |
| |
Jeff Smith wrote: > I've got no real issues at this point, but could you perhaps elaborate > a bit on the rough order of magnitude of "long" time
We have never-break-ABI policy in kernel. In practice it means we don't remove an interface if somebody could notice that it disappears.
Most likely it will go though intermediate step with separate kernel config option, like uselib(2) recently.
Don't worry. Just convert your code to avoid remap_file_pages() where it's possible.
> and what cases would be slower?
With emulation each remap_file_pages() will usually create one or two additional kernel structure which represents part of virtual address space of the process. Kernel often needs to lookup that structure by virtual address and this operation can be slower with high number of structures.
I've tried to test how bad it would be in near-worst case: 4G mapped in reverse page order. It creates 1 million structures. On my machine, fault in of all this memory is ~1.9 times slower with emulation comparing to original remap_file_pages(2). In practice, nobody will notice, I believe.
-- Kirill A. Shutemov
| ![\](/images/icornerr.gif) |