Subject: Re: CVS commit: src/sys
To: Simon Burge <simonb@NetBSD.org>
From: Jason Thorpe <thorpej@shagadelic.org>
List: source-changes
Date: 10/04/2006 09:52:39
On Oct 3, 2006, at 9:18 PM, Simon Burge wrote:
> Jason Thorpe wrote:
> For simple flags type usage, what would be the overhead to check a
> flag's value if it were in a proplib dictionary instead of just being
> a bit in a int in struct proc?
>
> To pick one example from kern/kern_sig.c where we loop over all
> processes:
>
> PROCLIST_FOREACH(p, &allproc) {
> if (p->p_pid <= 1 || p->p_flag & P_SYSTEM ||
> p == cp ||
> ....
>
> What would that look like in a proplib flags world, and what extra
> overheads would be involved in checking the value?
I'm not proposing changing ALL flags to some extensible mechanism ...
what I am suggesting is that what is needed is a way for arbitrary
subsystems to be able to augment procs and lwps.
I suggested a dictionary (can you blame me? it's kind of my pet
project right now :-). Yamamoto-san suggested a pthread_specific-
style API. I'm actually leaning towards the latter now, because I
think it's more appropriate for the type of usage that's being
suggested.
-- thorpej