linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Giuseppe Scrivano <gscrivan@redhat.com>
To: Rik van Riel <riel@surriel.com>
Cc: viro@zeniv.linux.org.uk, linux-kernel@vger.kernel.org,
	kernel-team@meta.com, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v3 0/2] ipc,namespace: fix free vs allocation race
Date: Fri, 27 Jan 2023 19:56:27 +0100	[thread overview]
Message-ID: <87wn57lsbo.fsf@redhat.com> (raw)
In-Reply-To: <20230127184651.3681682-1-riel@surriel.com> (Rik van Riel's message of "Fri, 27 Jan 2023 13:46:49 -0500")

Rik van Riel <riel@surriel.com> writes:

> The IPC namespace code frees ipc_namespace structures asynchronously,
> via a work queue item. This results in ipc_namespace structures being
> freed very slowly, and the allocation path getting false failures
> since the to-be-freed ipc_namespace structures have not been freed
> yet.
>
> Fix that by having the allocator wait when there are ipc_namespace
> structures pending to be freed.
>
> Also speed up the freeing of ipc_namespace structures. We had some
> discussions about this last year, and ended up trying out various
> "nicer" ideas that did not work, so I went back to the original,
> with Al Viro's suggestion for a helper function:
>
> https://lore.kernel.org/all/Yg8StKzTWh+7FLuA@zeniv-ca.linux.org.uk/
>
> This series fixes both the false allocation failures, and the slow
> freeing of ipc_namespace structures.
>
> v3: remove mq_put_mnt (thank you Giuseppe)
> v2: a few more fs/namespace.c cleanups suggested by Al Viro (thank you!)

Tested-by: Giuseppe Scrivano <gscrivan@redhat.com>


  parent reply	other threads:[~2023-01-27 18:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-27 18:46 [PATCH v3 0/2] ipc,namespace: fix free vs allocation race Rik van Riel
2023-01-27 18:46 ` [PATCH 1/2] ipc,namespace: make ipc namespace allocation wait for pending free Rik van Riel
2023-01-27 18:46 ` [PATCH 2/2] ipc,namespace: batch free ipc_namespace structures Rik van Riel
2023-01-27 18:56 ` Giuseppe Scrivano [this message]
2023-01-28  1:31 ` [PATCH v3 0/2] ipc,namespace: fix free vs allocation race Al Viro

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=87wn57lsbo.fsf@redhat.com \
    --to=gscrivan@redhat.com \
    --cc=kernel-team@meta.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=riel@surriel.com \
    --cc=viro@zeniv.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).