From: Andrew Morton <akpm@linux-foundation.org>
To: Giuseppe Scrivano <gscrivan@redhat.com>
Cc: linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org,
mingo@kernel.org, dave@stgolabs.net
Subject: Re: [RFC PATCH] ipc, mqueue: lazy call kern_mount_data in new namespaces
Date: Wed, 29 Nov 2017 14:17:44 -0800 [thread overview]
Message-ID: <20171129141744.5d401ff613116b0bde02cff3@linux-foundation.org> (raw)
In-Reply-To: <87wp29l6h3.fsf@redhat.com>
On Wed, 29 Nov 2017 11:33:28 +0100 Giuseppe Scrivano <gscrivan@redhat.com> wrote:
> Andrew Morton <akpm@linux-foundation.org> writes:
>
> > OK, but this simply moves the expense so it happens later on. Why is
> > that better?
>
> the optimization is for new IPC namespaces that don't use mq_open. In
> this case there won't be any kern_mount_data cost at all.
>
Fair enough. Please add this paragraph (or similar) to the changelog:
: This is a net saving for new IPC namespaces that don't use mq_open(). In
: this case there won't be any kern_mount_data() cost at all
And.. the patch calls
kern_mount_data()->vfs_kern_mount()->...->kmem_cache_zalloc(GFP_KERNEL)
under spin_lock(). This should have created a might_sleep() warning in
your testing, but obviously did not.
Could you please find out why? Do you have
CONFIG_DEBUG_ATOMIC_SLEEP=n, I hope? Please peruse
Documentation/process/submit-checklist.rst, section 12...
I assume a suitable fix would be to create a new mutex (static to
do_mq_open()) to prevent concurrent mounting.
next prev parent reply other threads:[~2017-11-29 22:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-27 12:55 Giuseppe Scrivano
2017-11-28 7:09 ` Davidlohr Bueso
2017-11-28 21:53 ` Andrew Morton
2017-11-29 10:33 ` Giuseppe Scrivano
2017-11-29 22:17 ` Andrew Morton [this message]
2017-11-30 12:20 ` Giuseppe Scrivano
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=20171129141744.5d401ff613116b0bde02cff3@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=dave@stgolabs.net \
--cc=gregkh@linuxfoundation.org \
--cc=gscrivan@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
/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
Powered by JetHome