tech-kern archive

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

Re: What's an "MPSAFE" driver need to do?



On Mar 1, 2013, at 02:41 , Mouse <mouse%Rodents-Montreal.ORG@localhost> wrote:

>> BTW, you probably want to enable LOCKDEBUG.
> 
> Okay.  New kernel build running as I type this.
> 
>> you'll probably see a very noticeable slowdown because of it, but it
>> picks up many many issues for you and is highly recommended for doing
>> MP driver development.
> 
> Any particular reason it isn't present-but-commented in GENERIC, the
> way DEBUG is?

It is on some architectures, but not all.  On my current sources:

netbsd:~/os/netbsd/src> grep LOCKDEBUG sys/arch/*/conf/GENERIC
sys/arch/amd64/conf/GENERIC:#options    LOCKDEBUG    # expensive locking 
checks/support
sys/arch/i386/conf/GENERIC:#options     LOCKDEBUG    # expensive locking 
checks/support
sys/arch/ia64/conf/GENERIC:#options     LOCKDEBUG    # expensive locking 
checks/support
sys/arch/iyonix/conf/GENERIC:#options   LOCKDEBUG
sys/arch/mac68k/conf/GENERIC:#options   LOCKDEBUG    # kernel lock debugging
sys/arch/sbmips/conf/GENERIC:#options   LOCKDEBUG    # XXX XXX XXX XXX
sys/arch/sparc/conf/GENERIC:#options    LOCKDEBUG
sys/arch/sparc64/conf/GENERIC:#options  LOCKDEBUG
sys/arch/vax/conf/GENERIC:#options      LOCKDEBUG

>  (Incidentally, what happened to ALL?  I thought there
> was going to be an ALL for each arch, with everything that made sense.
> I don't see one in 5.2's sys/arch/amd64/conf, though.)

Same thing as above (lack of consistency across architectures), I believe.

netbsd:~/os/netbsd/src> ls sys/arch/*/conf/ALL
sys/arch/i386/conf/ALL


Home | Main Index | Thread Index | Old Index