lkml.org 
[lkml]   [2017]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH] ipc, mqueue: lazy call kern_mount_data in new namespaces
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.

\
 
 \ /
  Last update: 2017-11-29 23:18    [W:0.077 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site