lkml.org 
[lkml]   [2005]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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/

\
 
 \ /
  Last update: 2009-11-18 23:46    [W:0.055 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site