Re: [PATCH v2] ns: do not block exit_task_namespaces() for a long time

2012-07-16 Thread Kirill A. Shutemov
On Mon, Jul 16, 2012 at 06:09:24PM +0300, Kirill A. Shutemov wrote: > 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). I was wrong here. No races. RCU

Re: [PATCH v2] ns: do not block exit_task_namespaces() for a long time

2012-07-16 Thread Al Viro
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" > > > > > > On exiting of the last task in a namespace we need to

Re: [PATCH v2] ns: do not block exit_task_namespaces() for a long time

2012-07-16 Thread Kirill A. Shutemov
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" > > > > On exiting of the last task in a namespace we need to trigger freeing of > > the namespace. Currently, we call synchronize_rcu() an

Re: [PATCH v2] ns: do not block exit_task_namespaces() for a long time

2012-07-16 Thread Myklebust, Trond
On Mon, 2012-07-16 at 19:39 +0300, Kirill A. Shutemov wrote: > On Mon, Jul 16, 2012 at 03:39:36PM +, Myklebust, Trond wrote: > > On Mon, 2012-07-16 at 18:09 +0300, Kirill A. Shutemov wrote: > > > From: "Kirill A. Shutemov" > > > > > > On exiting of the last task in a namespace we need to trig

Re: [PATCH v2] ns: do not block exit_task_namespaces() for a long time

2012-07-16 Thread Al Viro
On Mon, Jul 16, 2012 at 06:09:24PM +0300, Kirill A. Shutemov wrote: > From: "Kirill A. Shutemov" > > 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 s

Re: [PATCH v2] ns: do not block exit_task_namespaces() for a long time

2012-07-16 Thread Kirill A. Shutemov
On Mon, Jul 16, 2012 at 03:39:36PM +, Myklebust, Trond wrote: > On Mon, 2012-07-16 at 18:09 +0300, Kirill A. Shutemov wrote: > > From: "Kirill A. Shutemov" > > > > On exiting of the last task in a namespace we need to trigger freeing of > > the namespace. Currently, we call synchronize_rcu()

Re: [PATCH v2] ns: do not block exit_task_namespaces() for a long time

2012-07-16 Thread Myklebust, Trond
On Mon, 2012-07-16 at 18:09 +0300, Kirill A. Shutemov wrote: > From: "Kirill A. Shutemov" > > 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 synchron