linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Getting rid of SHMMAX/SHMALL ?
@ 2005-08-04 11:39 Andi Kleen
  2005-08-04 11:58 ` linux-os (Dick Johnson)
  2005-08-04 13:19 ` Hugh Dickins
  0 siblings, 2 replies; 12+ messages in thread
From: Andi Kleen @ 2005-08-04 11:39 UTC (permalink / raw)
  To: linux-kernel; +Cc: cr, linux-mm

I noticed that even 64bit architectures have a ridiculously low 
max limit on shared memory segments by default:

#define SHMMAX 0x2000000                 /* max shared seg size (bytes) */
#define SHMMNI 4096                      /* max num of segs system wide */
#define SHMALL (SHMMAX/PAGE_SIZE*(SHMMNI/16)) /* max shm system wide (pages) */

Even on 32bit architectures it is far too small and doesn't
make much sense. Does anybody remember why we even have this limit?

IMHO per process shm mappings should just be controlled by the normal
process and global mappings with the same heuristics as tmpfs
(by default max memory / 2 or more if shmfs is mounted with more)
Actually I suspect databases will usually want to use more 
so it might even make sense to support max memory - 1/8*max_memory

I would propose to get rid of of shmmax completely
and only keep the old shmall sysctl for compatibility.

Comments?

-Andi
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2005-08-07 11:38 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-04 11:39 Getting rid of SHMMAX/SHMALL ? Andi Kleen
2005-08-04 11:58 ` linux-os (Dick Johnson)
2005-08-04 13:19 ` Hugh Dickins
2005-08-04 13:23   ` Andi Kleen
2005-08-04 14:20     ` Matti Aarnio
2005-08-04 14:48       ` Hugh Dickins
2005-08-07 11:38         ` Alan Cox
2005-08-04 15:19       ` Andi Kleen
2005-08-04 22:49     ` Chen, Kenneth W
2005-08-04 22:54       ` Andi Kleen
2005-08-04 22:58         ` Chen, Kenneth W
2005-08-04 13:34   ` Jakob Oestergaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox