All of lore.kernel.org
 help / color / mirror / Atom feed
From: Davidlohr Bueso <dave@stgolabs.net>
To: Guillaume Knispel <guillaume.knispel@supersonicimagine.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Manfred Spraul <manfred@colorfullife.com>,
	Kees Cook <keescook@chromium.org>,
	Alexey Dobriyan <adobriyan@gmail.com>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Serge Hallyn <serge@hallyn.com>, Andrey Vagin <avagin@openvz.org>,
	Marc Pardo <marc.pardo@supersonicimagine.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ipc: optimize semget/shmget/msgget for lots of keys
Date: Mon, 7 Aug 2017 11:21:03 -0700	[thread overview]
Message-ID: <20170807182103.GC25038@linux-80c1.suse> (raw)
In-Reply-To: <20170731084237.GA123231@ubuntu>

On Mon, 31 Jul 2017, Guillaume Knispel wrote:
> struct ipc_ids {
> 	int in_use;
> 	unsigned short seq;
>+	bool tables_initialized;

So this is really ugly to have, but I understand why you added it. I
wonder what folks would think if we just panic() in the rhashtable_init()
ENOMEM case, and convert the EINVALs to WARNs. This way the function
would always be called successfully. This is similar to what futex_init
does, with the underlying hash table allocator panicing. sems and msg
would probably have to be converted to pure_initcall, but hey, we could
at least get the symmetry back.

> static int __init ipc_ns_init(void)
> {
>-	shm_init_ns(&init_ipc_ns);
>-	return 0;
>+	const int err = shm_init_ns(&init_ipc_ns);
>+	WARN(err, "ipc: sysV shm_init_ns failed: %d\n", err);

nit: s/sysV/sysv

>+	return err;
> }

Thanks,
Davidlohr

  parent reply	other threads:[~2017-08-07 18:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-31  8:42 [PATCH] ipc: optimize semget/shmget/msgget for lots of keys Guillaume Knispel
2017-07-31 15:45 ` Davidlohr Bueso
2017-08-01  1:17   ` Guillaume Knispel
2017-08-01 15:51     ` Davidlohr Bueso
2017-08-02 20:06 ` Davidlohr Bueso
2017-08-03 17:14   ` Guillaume Knispel
2017-08-07 17:33     ` Davidlohr Bueso
2017-08-07 18:21 ` Davidlohr Bueso [this message]
2017-08-09 16:15   ` Guillaume Knispel
2017-08-14  6:05 ` [lkp-robot] [ipc] cb6268f05d: reaim.jobs_per_min 865% improvement kernel test robot
2017-08-14  6:05   ` kernel test robot
2017-08-14 17:59   ` Kees Cook
2017-08-14 17:59     ` Kees Cook

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=20170807182103.GC25038@linux-80c1.suse \
    --to=dave@stgolabs.net \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=avagin@openvz.org \
    --cc=bigeasy@linutronix.de \
    --cc=ebiederm@xmission.com \
    --cc=guillaume.knispel@supersonicimagine.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.com \
    --cc=marc.pardo@supersonicimagine.com \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=serge@hallyn.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.