Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964852AbVITPIZ (ORCPT ); Tue, 20 Sep 2005 11:08:25 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S964952AbVITPIZ (ORCPT ); Tue, 20 Sep 2005 11:08:25 -0400 Received: from smtp.osdl.org ([65.172.181.4]:59611 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S964852AbVITPIY (ORCPT ); Tue, 20 Sep 2005 11:08:24 -0400 Date: Tue, 20 Sep 2005 08:07:31 -0700 (PDT) From: Linus Torvalds To: Robin Holt cc: Paul Jackson , zippel@linux-m68k.org, akpm@osdl.org, Simon.Derr@bull.net, linux-kernel@vger.kernel.org, nikita@clusterfs.com Subject: Re: [PATCH] cpuset semaphore depth check optimize In-Reply-To: <20050920145449.GA31461@lnx-holt.americas.sgi.com> Message-ID: References: <20050912153135.3812d8e2.pj@sgi.com> <20050913103724.19ac5efa.pj@sgi.com> <20050914124642.1b19dd73.pj@sgi.com> <20050915104535.6058bbda.pj@sgi.com> <20050920005743.4ea5f224.pj@sgi.com> <20050920120523.GC21435@lnx-holt.americas.sgi.com> <20050920072255.0096f1bb.pj@sgi.com> <20050920145449.GA31461@lnx-holt.americas.sgi.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1051 Lines: 29 On Tue, 20 Sep 2005, Robin Holt wrote: > > This makes things even easier!!! > > When you create a cpuset, set the refcount to 0. The root > cpuset is the exception and has a refcount of 1. > > When tasks are added to the cpuset, increment the refcount. > > When child cpusets are created, increment the refcount. Each > cpuset has a list of children that is protected by a single > lock. You just described the "dentry" reference counting. Which has the same issues: as long as a dentry has any children, it needs to remain. Except dentries are a lot more complex, because we want to keep cached versions of them around even when the count goes to zero (and zero only means that we're _allowed_ to remove it under memory pressure). And dentries can move from one parent to another. Linus - 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/