This commit is contained in:
Anton Blanchard 2017-05-12 21:30:02 +00:00 committed by GitHub
commit 77c739377a
1 changed files with 11 additions and 11 deletions

View File

@ -612,24 +612,24 @@ static inline int is_dead(int id) {
} }
static void open_shmem(void) { static void open_shmem(void) {
int shm_size = 4096;
#if defined(BIGNUMA)
// raised to 32768, enough for 128 nodes and 1024 cups
shm_size = 32*1024;
#endif
// needs to be at least one page
shm_size = MAX(getpagesize(), shm_size);
int try = 0; int try = 0;
do { do {
#if defined(BIGNUMA) shmid = shmget(SH_MAGIC, shm_size, 0666);
// raised to 32768, enough for 128 nodes and 1024 cups
shmid = shmget(SH_MAGIC, 32768, 0666);
#else
shmid = shmget(SH_MAGIC, 4096, 0666);
#endif
if (shmid == -1) { if (shmid == -1) {
#if defined(BIGNUMA) shmid = shmget(SH_MAGIC, shm_size, IPC_CREAT | 0666);
shmid = shmget(SH_MAGIC, 32768, IPC_CREAT | 0666);
#else
shmid = shmget(SH_MAGIC, 4096, IPC_CREAT | 0666);
#endif
} }
try ++; try ++;