From: Andrew Vagin <avagin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: cool linux <linux.cool.hot-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
"Eric W. Biederman"
<ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
Subject: Re: why this behavior in 3.16 kernel ?
Date: Wed, 3 Aug 2016 23:21:50 -0700 [thread overview]
Message-ID: <20160804062150.GB14503@gmail.com> (raw)
In-Reply-To: <20160804011401.GA20044-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
On Wed, Aug 03, 2016 at 06:14:02PM -0700, Andrew Vagin wrote:
> On Wed, Aug 03, 2016 at 12:48:49PM -0500, Eric W. Biederman wrote:
> > cool linux <linux.cool.hot-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
> >
> > > Hi,
> > >
> > > I have executed below script on 3.16 kernel and it took to finish almost
> > > 1.30sec to 2 minutes, where as in my older kernel(3.2.30) it took only 3
> > > secs.
> > >
> > > ================================================
> > > date
> > >
> > > for (( i=1; i <= 2000; i++ ))
> > > do
> > > ip netns exec gmk ip link show > /dev/null
> > > done
> > >
> > > date
> > > ================================================
> > >
> > > Please guide me why this behavior in 3.16 kernel ?
> >
> > Good question. What happens on a modern kernel? 4.7 is the most recent
> > release, 3.16 was released two years ago. My hunch is that you just
> > started using systemd and it has changed the defaults with all of the
> > mounts. But shrug. I don't recall how all of those relevant kernel
> > pieces operated two years ago.
>
[snip]
> [ ~]# time for i in `seq 2000`; do ip netns exec gmk ip
> link show; done > /dev/null
>
> real 0m40.129s
> user 0m1.272s
> sys 0m3.898s
>
> Then I boot the kernel with maxcpus=1. Surprise! Surprise! It works
> fast.
>
> [ ~]# ip netns add gmk
> [ ~]# time for i in `seq 2000`; do ip netns exec gmk ip
> link show; done > /dev/null
>
> real 0m2.445s
> user 0m0.604s
> sys 0m1.778s
This degradations is due to synchronize_rcu() in namespace_unlock(),
which was added in 48a066e72d9 ("RCU'd vfsmounts").
Here is timings for all calls during sys_unshare():
https://gist.github.com/avagin/3811fbbb553795a78fc6ae602f86866a
>
>
> >
> > Eric
> > _______________________________________________
> > Containers mailing list
> > Containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
> > https://lists.linuxfoundation.org/mailman/listinfo/containers
next prev parent reply other threads:[~2016-08-04 6:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-03 11:08 why this behavior in 3.16 kernel ? cool linux
[not found] ` <CAJ5w2CmDcXzOKppojwN2F5H-mFu_OM-XUoTWnTuLKrdoPG9iQg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-08-03 17:48 ` Eric W. Biederman
[not found] ` <877fbxhhfi.fsf-JOvCrm2gF+uungPnsOpG7nhyD016LWXt@public.gmane.org>
2016-08-04 1:14 ` Andrew Vagin
[not found] ` <20160804011401.GA20044-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-08-04 6:21 ` Andrew Vagin [this message]
[not found] ` <20160804062150.GB14503-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-08-04 7:19 ` cool linux
[not found] ` <CAJ5w2C=u_sNP4-ZHm1HH=stU-8ngbPDFuY7JimWqYPesPajkMg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-08-04 14:15 ` Eric W. Biederman
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=20160804062150.GB14503@gmail.com \
--to=avagin-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org \
--cc=linux.cool.hot-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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