3 ms·
> large 2MB and 1GB __cannot__ be paged. Even without what marcan_42 said, this is still false: a 2MB page is made of 512 4KB pages; page one of those out and
by a1369209993 6y ago
> large 2MB and 1GB __cannot__ be paged.
Even without what marcan_42 said, this is still false: a 2MB page is made of 512 4KB pages; page one of those out and use the freed memory as a page table for the other 511 (then page those out individually). If you have a contiguous, aligned 2MB block, defragment physical memory and fuse it into a huge page. It may very well be the case that linux chooses not to support this, and that's plausibly the correct decision, but it's not remotely impossible.
- my123 6y agoLinux does support transparent hugepages.
- a1369209993 6y agoIf so, then I'm glad I qualified that part with "It may very well be the case that" (and "plausibly").
- my123 6y agoSee: https://www.kernel.org/doc/Documentation/vm/transhuge.txt https://www.kernel.org/doc/Documentation/vm/transhuge.txt