Subject: Re: p_flag in struct proc: int -> uint64_t
To: Jason Thorpe <>
From: Andrew Doran <>
List: tech-kern
Date: 10/03/2006 01:44:50

On Mon, Oct 02, 2006 at 01:41:21PM -0700, Jason Thorpe wrote:

> On Oct 2, 2006, at 12:43 PM, Elad Efrat wrote:
> >Hi,
> >
> >I have a few changes that I'm working on that will require some  
> >process
> >flags. Regardless of whether eventually I'll commit them or not, we
> >reached the point where we have only one unused flag slot left in
> >p_flag.
> >
> >At the moment it's 'int', so I'd like to bump it to uint64_t at least.
> >
> >Is this okay? is there anything that is expected to break? I guess
> >sysctl because it uses int32_t, but anything else?
> What do you want to add?  Perhaps it's a good time to evaluate how the  
> flags are grouped and break them up in a logical fashion (facilitates  
> being protected by multiple locks, as well).

I think a good start would be to split p_flag into two fields, one which
contains flags that may be test/set from interrupt context, and one which
does not. The idea being that we may have general spin and sleep mutexes
associated with each struct proc, along with other locks.