Messages in this thread | | | Date | Tue, 20 Sep 2005 08:07:31 -0700 (PDT) | From | Linus Torvalds <> | Subject | Re: [PATCH] cpuset semaphore depth check optimize |
| |
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/
| |