From: Rik van Riel <riel@surriel.com>
To: linux-kernel@vger.kernel.org, viro@zeniv.linux.org.uk,
kernel-team@meta.com, linux-fsdevel@vger.kernel.org,
gscrivan@redhat.com
Subject: [PATCH 0/2] ipc,namespace: fix free vs allocation race
Date: Thu, 26 Jan 2023 15:57:19 -0500 [thread overview]
Message-ID: <20230126205721.582612-1-riel@surriel.com> (raw)
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.
next reply other threads:[~2023-01-26 20:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-26 20:57 Rik van Riel [this message]
2023-01-26 20:57 ` [PATCH 1/2] ipc,namespace: make ipc namespace allocation wait for pending free Rik van Riel
2023-01-26 20:57 ` [PATCH 2/2] ipc,namespace: batch free ipc_namespace structures Rik van Riel
2023-01-26 21:14 ` 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=20230126205721.582612-1-riel@surriel.com \
--to=riel@surriel.com \
--cc=gscrivan@redhat.com \
--cc=kernel-team@meta.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®