LKML Archive on
help / color / mirror / Atom feed
From: Nadia Derbey <>
To: Yasunori Goto <>
Subject: Re: [RFC PATCH 4/4] [RESEND] Recomputing msgmni on memory add / remove
Date: Tue, 15 Jan 2008 11:16:59 +0100	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

Yasunori Goto wrote:
>>Yasunori Goto wrote:
>>>Hello Nadia-san.
>>>>@@ -118,6 +122,10 @@ struct ipc_namespace {
>>>>	size_t		shm_ctlall;
>>>>	int		shm_ctlmni;
>>>>	int		shm_tot;
>>>>+	struct notifier_block ipc_memory_hotplug;
>>>I'm sorry, but I don't see why each ipc namespace must have each callbacks
>>>of memory hotplug.
>>>I prefer only one callback for each subsystem, not for each namespace.
>>>In addition, the recompute_msgmni() calculation looks very similar for
>>>all ipc namespace.
>>>Or do you wish each ipc namespace have different callback for the future?
>>Actually, this is what I wanted to do at the very beginning: have a 
>>single callback that would recompute the msgmni for each ipc namespace. 
>>But the issue here is that the namespaces are not linked to each other, 
>>so I had no simple way to go through all the namespaces.
>>I solved the issue by having a callback for any single ipc namespace and 
>>make it recompute the msgmni value for itslef.
> The recompute_msg() must be called when new ipc_namespace is created/removed
> as you mentioned. I think namespaces should be linked each other for it
> in the end....

Not if I do it the same way as for memory hotplug:
1) definee a "namespace event notifier"
2) insert another notifier block into the ipc namespace.
3) The callback routines in the notifier chain would be activated upon 
namespace creation / removal.

But I'm still thinking about it: Matt Helsley suggested that we might 
just copy the old namespace's value when creating a new namespace.

There's also the issue of an msgmni that has been changed via procfs: 
may be we should not unconditionally recompute it upon namespace 
creation / removal, so unregister the callback for the owning namespace 
as soon as msgmni has been changed from userspace.


  reply	other threads:[~2008-01-15 10:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-14 15:54 [RFC PATCH 0/4] [RESEND] Change default MSGMNI tunable to scale with lowmem Nadia.Derbey
2008-01-14 15:54 ` [RFC PATCH 1/4] [RESEND] Scaling msgmni to the amount of lowmem Nadia.Derbey
2008-01-14 15:54 ` [RFC PATCH 2/4] [RESEND] Scaling msgmni to the number of ipc namespaces Nadia.Derbey
2008-01-14 15:54 ` [RFC PATCH 3/4] [RESEND] Defining the slab_memory_callback priority as a constant Nadia.Derbey
2008-01-14 15:54 ` [RFC PATCH 4/4] [RESEND] Recomputing msgmni on memory add / remove Nadia.Derbey
2008-01-15  8:07   ` Yasunori Goto
2008-01-15  9:03     ` Nadia Derbey
2008-01-15  9:40       ` Yasunori Goto
2008-01-15 10:16         ` Nadia Derbey [this message]
2008-01-15  9:06 ` [RFC PATCH 0/4] [RESEND] Change default MSGMNI tunable to scale with lowmem Nadia Derbey
2008-01-15  9:21   ` Matt Helsley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \
    --subject='Re: [RFC PATCH 4/4] [RESEND] Recomputing msgmni on memory add / remove' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).