3 ms·
That's implied in how page tables work. If your pages are 16K then all your page levels are going to shift up two bits compared to 4K. Again, these aren't 16K "
by marcan_42 5y ago
That's implied in how page tables work. If your pages are 16K then all your page levels are going to shift up two bits compared to 4K. Again, these aren't 16K "huge pages", that'd be nice. This is changing the baseline page size.
Lots of things in the kernel count sizes in pages. If your page size can vary, suddenly a lot of kernel constants become boot-time variables. And if it can vary from process to process, suddenly lots of things are per-process. Say you run a 4K process. It wants to map some data from a file. That data is in the page cache in 16K chunks. Now you have one page cache page mapped to anywhere from 1 to 4 4K pages. How do you keep track of that? That wasn't necessary before.
What happens if a 16K process shares memory with a 4K process? If the 4K process sends the 16K process a 4K page, that page can't be mapped at all.
See how this is makes everything much more complicated?
- zozbot234 5y ago> See how this is makes everything much more complicated? Has this stuff been discussed elsewhere so far, e.g. on some linux kernel dev list? I think you've made a good case for not trying to support per-process page size right away, but many of these issues are not entirely new; they came up in some form as part of the transparent-huge-pages feature. It turns out that some hardware support already requires the kernel to understand "higher-order" mappings of contiguous physical pages, and "transparent huge pages" could leverage that support.