From: Nick Piggin <npiggin@suse.de>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Manfred Spraul <manfred@colorfullife.com>, linux-kernel@vger.kernel.org
Subject: Re: [patch 3/3] ipc: increase IPCMNI_MAX
Date: Mon, 24 May 2010 17:43:36 +1000 [thread overview]
Message-ID: <20100524074335.GX2516@laptop> (raw)
In-Reply-To: <20100521133136.d0e282df.akpm@linux-foundation.org>
On Fri, May 21, 2010 at 01:31:36PM -0700, Andrew Morton wrote:
> On Thu, 20 May 2010 17:07:41 +1000
> Nick Piggin <npiggin@suse.de> wrote:
>
> > Just wondering whether there is a good reason to have a full 16 bits of
> > sequence in ipc ids? 32K indexes is pretty easy to overflow, if only in
> > stress tests for now. I was doing some big aim7 stress testing, which
> > required this patch, but it's not exactly a realistic workload :)
> >
> > But the sequence seems like it just helps slightly with buggy apps, and
> > if the app is buggy then it can by definition mess up its own ids
> > anyway? So I don't see that such amount of seq is required.
> >
> > Index: linux-2.6/ipc/util.h
> > ===================================================================
> > --- linux-2.6.orig/ipc/util.h
> > +++ linux-2.6/ipc/util.h
> > @@ -14,7 +14,16 @@
> > #include <linux/err.h>
> >
> > /* IPCMNI_MAX should be <= MAX_INT, absolute limit for ipc arrays */
> > -#define IPCMNI_MAX_SHIFT 15
> > +/*
> > + * IPC ids consist of an index into the idr, which allocates from the bottom
> > + * up, and a sequence number which is continually incremented. Valid indexes
> > + * are from 0..IPCMNI_MAX (or further constrained by sysctls or other limits).
> > + * The sequence number prevents ids from being reused quickly. The sequence
> > + * number resides in the top part of the 'int' after IPCMNI_MAX.
> > + *
> > + * Increasing IPCMNI_MAX reduces the sequence wrap interval.
> > + */
> > +#define IPCMNI_MAX_SHIFT 20
> > #define IPCMNI_MAX (1 << IPCMNI_MAX_SHIFT)
> >
> > #define SEQ_SHIFT IPCMNI_MAX_SHIFT
>
> Some anaylsis of the worst-case memory consumption would be mollifying.
OK.
> I took the absence of Signed-off-by:'s to mean "rfc" and wandered away.
Yes. They should probably go through Manfred to you anyway.
prev parent reply other threads:[~2010-05-24 7:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-20 6:59 [patch 1/3] ipc: rename IPCMNI to IPCMNI_MAX Nick Piggin
2010-05-20 7:00 ` [patch 2/3] ipc: use shifts to extract seq/idx Nick Piggin
2010-05-20 18:16 ` Manfred Spraul
2010-05-21 1:33 ` Nick Piggin
2010-05-20 7:07 ` [patch 3/3] ipc: increase IPCMNI_MAX Nick Piggin
2010-05-21 20:31 ` Andrew Morton
2010-05-24 7:43 ` Nick Piggin [this message]
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100524074335.GX2516@laptop \
--to=npiggin@suse.de \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox