From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cedric Le Goater Subject: Re: [Devel] [RFC][PATCH 3/4]: Enable multiple mounts of /dev/pts Date: Thu, 07 Feb 2008 11:17:27 +0100 Message-ID: <47AADAB7.309@fr.ibm.com> References: <20080206050428.GA19461@us.ibm.com> <20080206051055.GC19764@us.ibm.com> <47A9D8D4.6030404@openvz.org> <20080206161608.GA16278@sergelap.austin.ibm.com> <47A9DF31.2040302@openvz.org> <20080206164328.GA16726@sergelap.austin.ibm.com> <47A9E6C5.7030209@openvz.org> <20080206173211.GA17655@sergelap.austin.ibm.com> <47AAD2C8.9090106@openvz.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <47AAD2C8.9090106-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Pavel Emelyanov Cc: Containers List-Id: containers.vger.kernel.org >>> Breaking this circle was not that easy with pid namespaces, so >>> I put the strut in proc_flush_task - when the last task from the >>> namespace exits the kern-mount-ed vfsmnt is dropped, but we can't >>> do the same stuff with devpts. >> But I still don't see what the problem is with my proposal? So long as >> you agree that if there are no tasks remaining in the devptsns, >> then any task which has its devpts mounted should see an empty directory >> (due to sb->s_info being NULL), I think it works. > > Well, if we _do_ can handle the races with ns->devpts_mnt switch > from not NULL to NULL, then I'm fine with this approach. I 'll take a look at it for the mq namespace. we will need to flush the dcache in some way nop ? to make sure the lookup in the directory fails to return anything after the ns has become NULL. I'm not an fs expert so I might be completely wrong there but I'll study in this direction to see if we can drop the CLONE_NEWNS. > I just remember, that with pid namespaces this caused a complicated > locking and performance degradation. This is the problem I couldn't > remember yesterday. That might have been bc you had to invalidate the /proc dentries ? C.