SHMLBA on linux-ia64
Hi -
The file /usr/include/sys/shm.h defines SHMLBA as __getpagesize() which
is 16K. whereas in /usr/include/asm/shmparam.h thereis another define of SHMLBA as (1024*1024) and a comment saying on IA-64 architecture due to some performance problems it is better to use this alignment.
We want to know what the recommended SHMLBA should be.
thanks in advance,
Umut
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · Umut Aymakoglu
Umut> Hi - The file /usr/include/sys/shm.h defines SHMLBA as Umut> __getpagesize() which is 16K.
Must be an old libc. For example, with glibc v2.3.2, I see:
$ fgrep 'e SHMLBA' /usr/include/bits/shm.h #define SHMLBA (1024 * 1024)
Umut> whereas in /usr/include/asm/shmparam.h thereis another define Umut> of SHMLBA as (1024*1024) and a comment saying on IA-64 Umut> architecture due to some performance problems it is better to Umut> use this alignment.
Not "performance problem" but "_potential_ performance degradation". On existing ia64 processors, you won't see a performance degradation, but it is nevertheless recommend to align shared mappings to a 1MB boundary because the architecture reserves the right that some future CPU might run slower when there is a virtual alias that is not congruent modulo 1MB.
--david