On Sun, Sep 17, 2006 at 01:10:04PM +0100, David Woodhouse wrote: > A bunch of architectures define it as PAGE_SIZE anyway, which is broken > when PAGE_SIZE gets killed off -- which we're doing either because it's > dynamic on the arch in question or just because we're killing it on a > bunch of architectures so we should kill it on all for consistency. > Userspace needs to learn to use getpagesize() or sysconf(_SC_PAGE_SIZE). > The other thing I forgot to mention is that PAGE_SIZE is really the wrong thing here anyways. On the systems with an aliasing dcache, it's the 4k pages that are generally the problem. On those platforms you can still switch to larger page sizes and then not have to worry about it.
So something like: > Hm, is there a sysconf(_SC_SHMLBA) ? would be much more useful. This would stop userspace libc's from doing things like #define SHMLBA (getpagesize() * 4).. In the 4k PAGE_SIZE case you still need the dcache specifics to figure out whether to bump up SHMLBA or not. So you either go with the safe route of using a "big enough" size that covers the worst-case aliasing scenario, or find a way to do it at run-time (ie, via the auxvt or _SC_SHMLBA). - To unsubscribe from this list: send the line "unsubscribe linux-arch" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
