From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Serge E. Hallyn" Subject: Re: [RFC] Transactional CGroup task attachment Date: Fri, 11 Jul 2008 10:34:21 -0500 Message-ID: <20080711153421.GA31344@us.ibm.com> References: <6599ad830807092346j1fdb2ef9l2ca2b52e2e68096a@mail.gmail.com> <20080711142739.GA25338@us.ibm.com> <6599ad830807110823l3835fba1sae3df01eeb3fa5da@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <6599ad830807110823l3835fba1sae3df01eeb3fa5da-JsoAwUIsXosN+BqQ9rBEUg@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: Paul Menage Cc: Linux Containers , Pavel Emelianov , Daisuke Miyakawa =?utf-8?B?KOWuruW3nSDlpKfovJQp?= , Peter Zijlstra , "balbir-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org" List-Id: containers.vger.kernel.org Quoting Paul Menage (menage-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org): > On Fri, Jul 11, 2008 at 7:27 AM, Serge E. Hallyn wrote: > > > > It does feel like it may be too much designed for one particular user > > (i.e. is there a reason not to expect a future cgroup to need a check > > under a spinlock before a check under a mutex - say an i_sem - in the > > can_attach sequence?), > > It would be fine as long as the code didn't want to *keep* holding the > spinlock after the first check, while taking the mutex - and since > that style of code is invalid under the existing locking rules, I > don't see that as a problem. There's nothing to stop a > prepare_attach_sleep() method from taking a spinlock as long as it > releases it before it returns. > > Paul Good point. For some stupid reason i was thinking don't take a spinlock at all. Have you started an implementation? thanks, -serge