linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Misc updates to sysv ipc
@ 2014-10-06 18:32 Manfred Spraul
  2014-10-06 18:32 ` [PATCH 1/3] ipc/sem.c: Chance memory barrier in sem_lock() to smp_rmb() Manfred Spraul
  0 siblings, 1 reply; 10+ messages in thread
From: Manfred Spraul @ 2014-10-06 18:32 UTC (permalink / raw)
  To: Andrew Morton
  Cc: LKML, Davidlohr Bueso, Michael Kerrisk, Rafael Aquini,
	Rik van Riel, 1vier1, Manfred Spraul

Hi Andrew,

I've updated the patches based on the feedback I got.
Could you include them in your tree and forward them to Linus?
I consider them as ready for merging.

0001-ipc-sem.c-Chance-memory-barrier-in-sem_lock-to-smp_r.patch
	When I rewrote sem_lock(), I was more conservative than
	necessary: smp_rmb() is sufficient.

0002-ipc-sem.c-increase-SEMMSL-SEMMNI-SEMOPM.patch
	- increase all limits
	- update the documentation, it was stale

0003-ipc-msg-increase-MSGMNI-remove-scaling.patch
	- increase MSGMNI to 32000
	- as a bonus, this removes around 300 lines
	- keep auto_msgmni, but document it as deprecated.

I've dropped:
	ipc-namespace-copy-settings-from-parent-namespace.patch

	- user space must handle the old logic anyway.
	- it could break userspace

--
	Manfred

^ permalink raw reply	[flat|nested] 10+ messages in thread
* [PATCH 0/3] ipc: Further updates to sysv/mqueue limits
@ 2014-08-12  7:29 Manfred Spraul
  2014-08-12  7:29 ` [PATCH 1/3] ipc/msg: increase MSGMNI, remove scaling Manfred Spraul
  0 siblings, 1 reply; 10+ messages in thread
From: Manfred Spraul @ 2014-08-12  7:29 UTC (permalink / raw)
  To: Andrew Morton
  Cc: LKML, Davidlohr Bueso, Michael Kerrisk, Rafael Aquini,
	Rik van Riel, 1vier1, Manfred Spraul

Hi Andrew,

I got some positive and no negative feedback on my patches, thus:
Could you add the patches to -mm and push them towards Linus?

0001-ipc-msg-increase-MSGMNI-remove-scaling.patch
	- increase MSGMNI to 32000
	- as a bonus, this removes around 300 lines

0002-ipc-sem.c-increase-SEMMSL-SEMMNI-SEMOPM.patch
	- increase all limits
	- update the documentation, it was stale

   Note: Redhat/Oracle recommend values that exceed what I would recommend
   as safe upper limits.
 
https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Tuning_and_Optimizing_Red_Hat_Enterprise_Linux_for_Oracle_9i_and_10g_Databases/sect-Oracle_9i_and_10g_Tuning_Guide-Setting_Semaphores-An_Example_of_Semaphore_Settings.html 

   Unfortunately I didn't get any replies, thus I don't know how to proceed.

   One option would be to switch from kmalloc to ipc_alloc, then the risk of
   failing due to memory fragmentation would be resolved.

0003-ipc-namespace-copy-settings-from-parent-namespace.patch
	Change the namespace code so that a new namespace inherits the values
	from it's parent instead of the boot time defaults.

	Serge Hallyn and Michael Kerrisk also consider the new approach as better.
	One thing that is a bit surprising is that clone(CLONE_NEWIPC)k

I've tested the changes both with unshare -i and with my own test apps.
Unfortunately I didn't manage to get lxc to run on my busybox test setup :-(

--
	Manfred

^ permalink raw reply	[flat|nested] 10+ messages in thread
* [PATCH 0/3] ipc: Further updates to sysv/mqueue limits
@ 2014-05-29 18:46 Manfred Spraul
  2014-05-29 18:46 ` [PATCH 1/3] ipc/msg: increase MSGMNI, remove scaling Manfred Spraul
  0 siblings, 1 reply; 10+ messages in thread
From: Manfred Spraul @ 2014-05-29 18:46 UTC (permalink / raw)
  To: Davidlohr Bueso, Michael Kerrisk, Rafael Aquini, Rik van Riel
  Cc: LKML, 1vier1, Manfred Spraul

Hi all,

a) If we increase SHMMAX/SHMALL, then it makes sense to
   increase MSGMNI, too.
   And: This allows to remove the automatic scaling (~300 lines)

b) We can also increase SEMMSL, SEMMNI and SEMOPM

c) I think it would make more sense if a namespace starts with the
   limits from it's parent:
   If an admin set the limits, then he probably wants that these limits also
   apply for a new child namespace.

All patches are RFC - they compile, but that's it.

TODO:
- check if the sysv sem limits are sane.
  Especially the SEMOPM - if real users exist that pass > 1k ops, then
  switch from kmalloc to vmalloc.

  @the Redhat developers: Do you have any idea where this "often
  recommended" comes from?
  https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Tuning_and_Optimizing_Red_Hat_Enterprise_Linux_for_Oracle_9i_and_10g_Databases/sect-Oracle_9i_and_10g_Tuning_Guide-Setting_Semaphores-The_SEMOPM_Parameter.html

- copy Davidlohrs explanation for the sysv shm limits to sysv msg and
  sysv sem.

- check if we should also increase the limits for posix mqueue

- decide if it would make sense to increase IPCMNI:

  Right now, it is 32768. This means that after 65536 pairs of
  semget()/semctl(IPC_RMID), semget() will return the same identifier
  again - and a semop(old_id) won't return -EINVAL, instead it will
  access the "new" array, which is probably now what the caller
  intended to do.

  The split is arbitrary - we could also split it 1048576/2048 or any
  other split we want.

- test everything.

--
	Manfred

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

end of thread, other threads:[~2014-10-09 23:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-06 18:32 [PATCH 0/3] Misc updates to sysv ipc Manfred Spraul
2014-10-06 18:32 ` [PATCH 1/3] ipc/sem.c: Chance memory barrier in sem_lock() to smp_rmb() Manfred Spraul
2014-10-06 18:32   ` [PATCH 2/3] ipc/sem.c: increase SEMMSL, SEMMNI, SEMOPM Manfred Spraul
2014-10-06 18:32     ` [PATCH 3/3] ipc/msg: increase MSGMNI, remove scaling Manfred Spraul
2014-10-07 20:09     ` [PATCH 2/3] ipc/sem.c: increase SEMMSL, SEMMNI, SEMOPM Rafael Aquini
2014-10-07 20:08   ` [PATCH 1/3] ipc/sem.c: Chance memory barrier in sem_lock() to smp_rmb() Rafael Aquini
2014-10-09 23:07   ` Davidlohr Bueso
  -- strict thread matches above, loose matches on Subject: below --
2014-08-12  7:29 [PATCH 0/3] ipc: Further updates to sysv/mqueue limits Manfred Spraul
2014-08-12  7:29 ` [PATCH 1/3] ipc/msg: increase MSGMNI, remove scaling Manfred Spraul
2014-08-12  7:29   ` [PATCH 2/3] ipc/sem.c: increase SEMMSL, SEMMNI, SEMOPM Manfred Spraul
2014-08-15 13:42     ` Rafael Aquini
2014-05-29 18:46 [PATCH 0/3] ipc: Further updates to sysv/mqueue limits Manfred Spraul
2014-05-29 18:46 ` [PATCH 1/3] ipc/msg: increase MSGMNI, remove scaling Manfred Spraul
2014-05-29 18:46   ` [PATCH 2/3] ipc/sem.c: increase SEMMSL, SEMMNI, SEMOPM Manfred Spraul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).