Re: Ok, making ready for pre-2.4 and code-freeze..

Linus Torvalds (torvalds@transmeta.com)
Mon, 20 Dec 1999 14:22:38 -0800 (PST)


On Mon, 20 Dec 1999, Simon Kirby wrote:
>
> Is it a good idea to expect userspace to assume PAGE_SIZE/PAGE_SHIFT are
> constants? Don't some architectures have variable page sizes?

Oh, the _shift_ will be a constant. The ia32 "ABI" for the mmap2() thing
would essentially be

mmap64(...)
{
if (offset & 0xfff)
return -EINVAL;
mmap2(.. (unsigned long) (offset >> 12) ..)
}

and it would not know, nor care, about the kernel maybe some time in the
future having some other definition for the page size.

(The "index" in the page cache is actually not a PAGE_SIZE at all right
now: it's really a "PAGE_CACHE_SIZE", and it can in theory be different on
the same machine even if the hardware page size stays the same).

Don't even think of it as a page-size, really, think of it more as a
"shifted value". It so happens that implementation-wise it shifts to the
most convenient value for the kernel.

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/