Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750869AbWBEPLf (ORCPT ); Sun, 5 Feb 2006 10:11:35 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750901AbWBEPLf (ORCPT ); Sun, 5 Feb 2006 10:11:35 -0500 Received: from 7ka-campus-gw.mipt.ru ([194.85.83.97]:496 "EHLO 7ka-campus-gw.mipt.ru") by vger.kernel.org with ESMTP id S1750856AbWBEPLf (ORCPT ); Sun, 5 Feb 2006 10:11:35 -0500 Message-ID: <43E6154C.80807@sw.ru> Date: Sun, 05 Feb 2006 18:10:04 +0300 From: Kirill Korotaev User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050715) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Greg KH CC: Dave Hansen , Linus Torvalds , Kirill Korotaev , Andrew Morton , Linux Kernel Mailing List , frankeh@watson.ibm.com, clg@fr.ibm.com, alan@lxorguk.ukuu.org.uk, serue@us.ibm.com, arjan@infradead.org, Rik van Riel , Alexey Kuznetsov , Andrey Savochkin , devel@openvz.org, Pavel Emelianov Subject: Re: [RFC][PATCH 1/5] Virtualization/containers: startup References: <43E38BD1.4070707@openvz.org> <43E3915A.2080000@sw.ru> <1138991641.6189.37.camel@localhost.localdomain> <20060203201945.GA18224@kroah.com> In-Reply-To: <20060203201945.GA18224@kroah.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1129 Lines: 26 > On Fri, Feb 03, 2006 at 10:34:01AM -0800, Dave Hansen wrote: >> Lastly, is this a place for krefs? I don't see a real need for a >> destructor yet, but the idea is fresh in my mind. > > Well, what happens when you drop the last reference to this container? > Right now, your patch doesn't cause anything to happen, and if that's > acceptable, then fine, you don't need to use a struct kref. > > But if not, then why have a reference count at all? :) Please note, this patch introduces only small parts of it. It doesn't introduce the code which creates containers/destroys them etc. As I mentioned in another email: In OpenVZ we have 2-level refcounting (mentioned recently by Linus as in mm). Process counter is used to decide when container should collapse/cleanuped and real refcounter is used to free the structures which can be referenced from somewhere else. Kirill - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/