Subject: Re: spl checks in simple_lock [was Re: v_interlock/splbio protocol violations]
To: Darrin B. Jewell <dbj@netbsd.org>
From: Aymeric Vincent <vincent@labri.fr>
List: tech-kern
Date: 03/10/2004 15:53:33
Darrin B. Jewell wrote:

> I've added an argument to simple_lock_init(9), SIMPLELOCK_INITIALIZER,
> and pool_init(9) which encodes a minimum spl level which is required
> for all uses of that lock or pool.

I think it would be better to use new functions that take this extra 
parameter (simple_lock_init_spl() or something like that) because it 
would make the migration easier: you could commit the "highlights" part 
of your diff right now and calls to simple_lock_init() and pool_init() 
could then be changed later.

The other reason is because it looks bad to me to force a user of the 
locking or (worse) pool API to know about SPLs.

Otherwise, I think it should prove a very good debugging tool, as (I 
believe) your recent commits show and I think it's a good idea to have 
something like this committed.

Regards,
  Aymeric