[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120716172225.GO31729@ZenIV.linux.org.uk>
Date: Mon, 16 Jul 2012 18:22:25 +0100
From: Al Viro <viro@...IV.linux.org.uk>
To: "Kirill A. Shutemov" <kirill@...temov.name>
Cc: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Pavel Emelyanov <xemul@...nvz.org>,
Serge Hallyn <serge.hallyn@...onical.com>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
"Dmitry V. Levin" <ldv@...linux.org>,
Doug Ledford <dledford@...hat.com>,
linux-kernel@...r.kernel.org, containers@...ts.linux-foundation.org
Subject: Re: [PATCH v2] ns: do not block exit_task_namespaces() for a long
time
On Mon, Jul 16, 2012 at 08:16:34PM +0300, Kirill A. Shutemov wrote:
> On Mon, Jul 16, 2012 at 05:53:01PM +0100, Al Viro wrote:
> > On Mon, Jul 16, 2012 at 06:09:24PM +0300, Kirill A. Shutemov wrote:
> > > From: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
> > >
> > > On exiting of the last task in a namespace we need to trigger freeing of
> > > the namespace. Currently, we call synchronize_rcu() and free_nsproxy()
> > > directly on do_exit() path.
> > >
> > > On my machine synchronize_rcu() blocks for about 0.01 seconds. For
> > > comparing: normal exit_group() syscall takes less than 0.0003 seconds.
> > >
> > > Let's offload synchronize_rcu() and free_nsproxy() to a workqueue.
> > >
> > > I also move synchronize_rcu() inside free_nsproxy(). It fixes racy
> > > put_nsproxy() which calls free_nsproxy() without synchronize_rcu().
> > > I guess it was missed during switch to RCU (see cf7b708).
> >
> > NAK. Making final umounts of anything in that namespace asynchronous,
> > even though nothing is holding the stuff on them busy is simply
> > wrong. Note that they can take a _long_ time, so we are talking about
> > minutes worth of delay in the worst case. It's user-visible and
> > it's a serious potential for trouble.
>
> Good point.
>
> Now in worst case we have a process which hang for a few minutes in
> exit_group() syscall in D state, right? Why is that any better?
> Does it provide better user experience or better accounting or what?
"Session that was using that USB stick has still not finished exiting;
might be still busy writing stuff there, so better not pull it out yet".
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists