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: Wed, 2 Aug 2017 13:06:44 -0700	[thread overview]
Message-ID: <20170802200644.GA2395@linux-80c1.suse> (raw)
In-Reply-To: <20170731084237.GA123231@ubuntu>

On Mon, 31 Jul 2017, Guillaume Knispel wrote:
> static int __init ipc_init(void)
> {
>-	sem_init();
>-	msg_init();
>+	int err_sem, err_msg;
>+
>+	err_sem = sem_init();
>+	WARN(err_sem, "ipc: sysV sem_init failed: %d\n", err_sem);
>+	err_msg = msg_init();
>+	WARN(err_msg, "ipc: sysV msg_init failed: %d\n", err_msg);
> 	shm_init();

This shows the ugliness of the underlying ipc init asymmetry. Specifically,
140d0b2108f (Do 'shm_init_ns()' in an early pure_initcall) was the final
nail in the coffin to fix an exit_shm() race.

While normally we could just initialize the ipc_ids fields statically and
be over with initcall dependencies, your patch will require inits be done
dynamically for the rhashtable_init(). Oh well.

Also, why do you do this?

> -pure_initcall(ipc_ns_init);
> +core_initcall(ipc_ns_init);

Thanks,
Davidlohr

  parent reply	other threads:[~2017-08-02 20:07 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 [this message]
2017-08-03 17:14   ` Guillaume Knispel
2017-08-07 17:33     ` Davidlohr Bueso
2017-08-07 18:21 ` Davidlohr Bueso
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=20170802200644.GA2395@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.