Re: Spin lock (?) problems with MUTEX_PROFILING

2002-04-25 Thread John Baldwin


On 25-Apr-2002 Dag-Erling Smorgrav wrote:
> John Baldwin <[EMAIL PROTECTED]> writes:
>> This means WITNESS is broken with MUTEX_PROFIING (I guess they were
>> never tested together without WITNESS_SKIPSPIN).
> 
> WITNESS makes my box about as useful as a heap of bricks, so no,
> MUTEX_PROFILING was never tested with WITNESS.

Since WITNESS makes sure you use locks properly, you should use it when
you are making changes to the locking subsystem.  Esp. if you are
messing with spin locks.  It may be slow but it's still usable for doing
a bootup.  Getting into single user mode with profiling on would have
highlighted this problem.

-- 

John Baldwin <[EMAIL PROTECTED]>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Spin lock (?) problems with MUTEX_PROFILING

2002-04-25 Thread Dag-Erling Smorgrav

John Baldwin <[EMAIL PROTECTED]> writes:
> This means WITNESS is broken with MUTEX_PROFIING (I guess they were
> never tested together without WITNESS_SKIPSPIN).

WITNESS makes my box about as useful as a heap of bricks, so no,
MUTEX_PROFILING was never tested with WITNESS.

>   The fix is for the
> MUTEX_PROFILING folks to add the spin lock into the spin lock order
> list in the proper location.

Junior kernel hacker task.  Note that it's always a leaf lock - no
lock is ever acquired while the profiling lock is held.

DES
-- 
Dag-Erling Smorgrav - [EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



RE: Spin lock (?) problems with MUTEX_PROFILING

2002-04-25 Thread John Baldwin


On 24-Apr-2002 Hiten Pandya wrote:
> Hi all,
> 
> I am not generating a false alarm, but I compiled a fresh kernel
> yesterday with the MUTEX_PROFILING option, and it just went haywire just
> after the FreeBSD copyright messages and the build info:
> 
>   [ Copyright Info ]
>   [ Build Information ]
>   panic: spin lock mutex profiling lock not in order list
> 
> I had no idea how to debug this, so I am sending it to the -current list
> and cc'ing a copy to DES.  I am also attaching my kernel configuration
> file for reference purposes.

This means WITNESS is broken with MUTEX_PROFIING (I guess they were never
tested together without WITNESS_SKIPSPIN).  The fix is for the MUTEX_PROFILING
folks to add the spin lock into the spin lock order list in the proper location.

-- 

John Baldwin <[EMAIL PROTECTED]>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Spin lock (?) problems with MUTEX_PROFILING

2002-04-24 Thread Hiten Pandya

Hi all,

I am not generating a false alarm, but I compiled a fresh kernel
yesterday with the MUTEX_PROFILING option, and it just went haywire just
after the FreeBSD copyright messages and the build info:

[ Copyright Info ]
[ Build Information ]
panic: spin lock mutex profiling lock not in order list

I had no idea how to debug this, so I am sending it to the -current list
and cc'ing a copy to DES.  I am also attaching my kernel configuration
file for reference purposes.

Thanks

-- 
Hiten Pandya
http://storm.uk.FreeBSD.org/~hiten
Finger [EMAIL PROTECTED] for PGP public key
-- 4FB9 C4A9 4925 CF97 9BF3  ADDA 861D 5DBD E4E3 03C3 


# -current Kernel Configuration file
# Hiten Pandya

machine i386
cpu I686_CPU
ident   CURRENT5
maxusers500

#To statically compile in device wiring instead of /boot/device.hints
#hints  "GENERIC.hints" #Default places to look for devices.
profile 2

makeoptions DEBUG=-g#Build kernel with gdb(1) debug symbols

options DEVICE_POLLING  #Polling support on devices

options UFS_DIRHASH #DIRHASH Support for Kernel
options COMPAT_LINUX#Linux Compatibility
options PERFMON #Performance Monitories
options VESA#Large Splash Screen Support
options INET#InterNETworking
options FFS #Berkeley Fast Filesystem
options SOFTUPDATES #Enable FFS soft updates support
options MD_ROOT #MD is a potential root device
options MSDOSFS #MSDOS Filesystem
options CD9660  #ISO 9660 Filesystem

options PSEUDOFS#New PROCFS Framework dependancy!
options PROCFS  #Process filesystem

options COMPAT_43   #Compatible with BSD 4.3 [KEEP THIS!]
#optionsUSERCONFIG  #boot -c editor
#optionsVISUAL_USERCONFIG   #visual boot -c editor
options KTRACE  #ktrace(1) support
options SYSVSHM #SYSV-style shared memory
options SYSVMSG #SYSV-style message queues
options SYSVSEM #SYSV-style semaphores
options P1003_1B#Posix P1003_1B real-time extensions
options _KPOSIX_PRIORITY_SCHEDULING
options KBD_INSTALL_CDEV# install a CDEV entry in /dev

# Debugging for use in -current
options DDB #Enable the kernel debugger
options INVARIANTS  #Enable calls of extra sanity checking
options INVARIANT_SUPPORT   #Exta sanity checking.
options WITNESS #Enable mutex checks to detect. 
options MUTEX_DEBUG #Debug Mutexes
options MUTEX_PROFILING #Mutex Profiling

# Miscelleneous Options
options REGRESSION  #Regression Testing (needed!)
options DONTPROBE_1284

#optionsSMP # Symmetric MultiProcessor Kernel
#optionsAPIC_IO # Symmetric (APIC) I/O

device  isa
device  eisa
device  pci
options PCI_ENABLE_IO_MODES # Enable pci resources left off by a "lazy 
BIOS"

# Floppy drives
device  fdc

# ATA and ATAPI devices
device  ata
device  atadisk # ATA disk drives
device  atapicd # ATAPI CDROM drives
device  atapifd # ATAPI floppy drives
options ATA_STATIC_ID   # Static device numbering

# atkbdc0 controls both the keyboard and the PS/2 mouse
device  atkbdc  1   # At keyboard controller
device  atkbd   # at keyboard
device  psm # psm mouse

device  vga # VGA screen

# splash screen/screen saver
device  splash
device  sc  # SysCon Device

device  npx # Floating Point Device (not to disable!)
device  apm # Power Managment Support
device  pmtimer # Suspend/Resume Timer

# Serial (COM) ports
#device sio # 8250, 16[45]50 based serial ports

# Parallel port
device  ppc
device  ppbus   # Parallel port bus (required)
device  lpt # Printer
device  ppi # Parallel port interface device
#device vpo # Requires scbus and da

device  miibus  # MII bus support
device  fxp # Intel EtherExpress PRO/100B (82557, 82558)

# Pseudo devices - the number indicates how many units to allocate.
device  random  # Entropy device (Strong Cryptography!)
device  loop# Network loopback
device  ether   # Ethernet support
device