[Pkg-lustre-maintainers] [Lustre-discuss] PAGE_SIZE usage in lustre and a debian fix.

Andreas Dilger adilger at clusterfs.com
Fri Mar 9 12:08:11 UTC 2007


On Mar 08, 2007  13:34 -0800, David Brown wrote:
> I've been having an on going conversation on lkml about it and they
> really say, "use getpagesize()" but lustre uses PAGE_MASK PAGE_SHIFT
> and all the other defines in your userspace code as well. So the first
> part of the patch is what should be happening and the second part is
> fast hack to get it to build with a 'safe' value for the page size.
> Really the correct fix would be to obtain the value of PAGE_SIZE via
> getpagesize() then create some functions to get PAGE_MASK and
> PAGE_SHIFT from the value returned by getpagesize(). At least that's
> what I'd do...

My point is that because liblustre is really a user-space application,
it doesn't care so much what value is used for PAGE_SIZE.  I suspect
(though I haven't really done an in-depth analysis) that you could
set PAGE_SIZE to some arbitrary power-of-two multiple of 4096 and not
have any problems at all.

The PAGE_SIZE define IS used in the code that is shared between liblustre
and the linux client filesystem code (llite) but those are used in
completely disjoint settings.  The only thing that matters is that the
liblustre build environment supply SOME sensible value for PAGE_SIZE &
friends so that the shared code will compile.

Cheers, Andreas
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.




More information about the Pkg-lustre-maintainers mailing list