Re: [PATCH] cpuset semaphore depth check optimize

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Linus Torvalds <[email protected]> wrote:

> Personally, the thing that makes me think the patch is ugly is the 
> fact that the different parts of the nested semaphore are all 
> separate. I'd prefer to see a
> 
> 	struct nested_semaphore {
> 		struct semaphore sem;
> 		struct task_struct *owner;
> 		unsigned int count;
> 	};
> 
> and then operate on _that_ level instead.

btw., this is how the -rt tree implements (read-)nesting for rwsems and 
rwlocks. The more sharing and embedding of types and primitives, the 
more compact the whole code becomes, and the easier it is to change 
fundamental properties.

	Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux