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

Cyrill Gorcunov gorcunov at gmail.com
Wed Oct 8 06:18:35 PDT 2014


On Wed, Oct 08, 2014 at 05:01:03PM +0400, Pavel Emelyanov wrote:
> > 
> > or something like that.
> 
> But the intention was exactly to avoid compile-time PAGE_SIZE, thus
> direct call to _sysconf on ARM looks more acceptable here.

Ah, indeed, sorry. Maybe PAGE_SIZE itself should become an inliner for arm
then (either cached value or a direct call to sysconf), on x86 we could
leave it as is (ie 4K predefined value).

> As far as the performance is concerned. In the current set I see no
> problems having one as a call, but we may someday have the PAGE_SIZE
> get involved into some for() loop and making one call per iteration
> would just produce unnecessary noise.
> 
> Can we "cache" the value in kerndat.c and always use the variable?


More information about the CRIU mailing list