From: Eric Chanudet <echanude@redhat.com>
To: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-rt-users@vger.kernel.org,
Alexander Larsson <alexl@redhat.com>,
Andrew Halaney <ahalaney@redhat.com>,
Eric Chanudet <echanude@redhat.com>
Subject: [RFC PATCH RESEND 0/1] fs/namespace: defer free_mount from namespace_unlock
Date: Thu, 19 Jan 2023 16:14:54 -0500 [thread overview]
Message-ID: <20230119211455.498968-1-echanude@redhat.com> (raw)
We noticed significant slow down when running containers on an Aarch64 system
with the RT patch set using the following test:
# mkdir -p "rootfs/bin"
# printf "int main(){return 0;}" | gcc -x c - -static -o rootfs/bin/sh
# crun spec
# perf stat -r 10 --table --null -- crun run test
Performance counter stats for 'crun run test' (10 runs):
# Table of individual measurements:
0.3902 (-0.1941) ##########
0.5791 (-0.0053) #
0.5785 (-0.0058) #
0.5891 (+0.0047) #
0.6682 (+0.0839) ###
0.5507 (-0.0337) ##
0.5888 (+0.0044) #
0.5797 (-0.0047) #
0.5977 (+0.0133) #
0.7217 (+0.1374) ####
# Final result:
0.5844 +- 0.0269 seconds time elapsed ( +- 4.60% )
A 6.2 non-RT kernel results on the same hardware for comparison:
Performance counter stats for 'crun run test' (10 runs):
# Table of individual measurements:
0.1680 (+0.1375) #################
0.0074 (-0.0231) ###############################################################
0.0073 (-0.0232) ################################################################
0.0070 (-0.0235) ####################################################################
0.0072 (-0.0233) #################################################################
0.0794 (+0.0489) #############
0.0078 (-0.0227) ##########################################################
0.0070 (-0.0235) ###################################################################
0.0070 (-0.0235) ####################################################################
0.0068 (-0.0237) ######################################################################
# Final result:
0.0305 +- 0.0169 seconds time elapsed ( +- 55.33% )
It looks like there is one bottleneck in:
-> do_umount
-> namespace_unlock
-> synchronize_rcu_expedited
With the following patch, namespace_unlock will queue up the resources that
needs to be released and defer the operation through call_rcu to return without
waiting for the grace period.
Alexander Larsson (1):
fs/namespace: defer free_mount from namespace_unlock
fs/namespace.c | 42 +++++++++++++++++++++++++++++++++++-------
1 file changed, 35 insertions(+), 7 deletions(-)
--
2.39.0
next reply other threads:[~2023-01-19 21:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-19 21:14 Eric Chanudet [this message]
2023-01-19 21:14 ` [RFC PATCH RESEND 1/1] fs/namespace: defer free_mount from namespace_unlock Eric Chanudet
2023-01-19 22:09 ` Al Viro
2023-01-20 8:43 ` Alexander Larsson
2023-01-30 2:57 ` kernel test robot
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=20230119211455.498968-1-echanude@redhat.com \
--to=echanude@redhat.com \
--cc=ahalaney@redhat.com \
--cc=alexl@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@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;
as well as URLs for NNTP newsgroup(s).