[CRIU] [PATCH 1/6] Replace PAGE_SIZE in vaddr_to_pfn

Cyrill Gorcunov gorcunov at gmail.com
Tue Oct 7 02:15:02 PDT 2014


On Tue, Oct 07, 2014 at 01:06:54PM +0400, Pavel Emelyanov wrote:
> On 10/06/2014 10:50 PM, Christopher Covington wrote:
> > On AArch64, pages may be 4K or 64K depending on kernel configuration.
> > Instead of using the build time constant PAGE_SIZE, query the page
> > size at run time using sysconf(_SC_PAGESIZE).
> 
> AFAIK on x86 the PAGE_SIZE is always 4k (Cyrill?).

yes (on hw level it is not, but from software view PAGE_SIZE is always 4k)

> 
> If this is true, can we have the vaddr_to_pfn() still operate on
> a constant rather than the _sysconf() call for x86?

This kind of things should be wrapped with #ifdef depending on
arch we're working on and for x86 it should remains 4k constant.


More information about the CRIU mailing list