DragonFly commits List (threaded) for 2007-06
DragonFly BSD
DragonFly commits List (threaded) for 2007-06
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: cvs commit: src/sys/dev/sound/isa ad1816.c mss.c sbc.c src/sys/dev/sound/pci als4000.c atiixp.c aureal.c cmi.c ds1.c emu10k1.c envy24.c envy24ht.c es137x.c ich.c maestro.c maestro3.c solo.c spicds.c t4dwave.c via8233.c via82c686.c ...

From: "Simon 'corecode' Schubert" <corecode@xxxxxxxxxxxx>
Date: Fri, 22 Jun 2007 22:19:18 +0200

Matthew Dillon wrote:
  Fix issues with spinlocks being held through blocking conditions (because
  DragonFly spinlocks aren't FreeBSD mutexes) by replacing the spinlocks
  with lockmgr locks.

I'm afraid this breaks more than it fixes. I get panics on module unload with this. What I guess happens is this:

1. detach() called
2. obtains lock
3.			interrupt arrives
4.			tries to obtain lock, sleeps (stupid for intr)
5. removes interrupt
6. releases lock
7. destroys lock
8. unloads module
9.			wakes up
10.			tries to obtain lock (other lock or so)
11.			panic, lock in invalid state:

mixer: ops removed
dsp(30)[000000ff/00000003]: Warning: dev_ops_remove() called while 10 device refs still exist!
dsp(30)[000000ff/00000005]: Warning: dev_ops_remove() called while 6 device refs still exist!
dsp(30)[000000ff/00010003]: Warning: dev_ops_remove() called while 5 device refs still exist!
dsp(30)[000000ff/00010005]: Warning: dev_ops_remove() called while 4 device refs still exist!
dsp(30)[000000ff/0001000b]: Warning: dev_ops_remove() called while 3 device refs still exist!
dsp(30)[000000ff/00020003]: Warning: dev_ops_remove() called while 2 device refs still exist!
dsp(30)[000000ff/00020005]: Warning: dev_ops_remove() called while 1 device refs still exist!
pcm0: detached
panic: lockmgr: non-zero exclusive count

how do freebsd deal with this sleeping thing? I have to review the code, maybe they only access one "hardware" lock, then we should use serializers for this.


Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low €€€ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \

Attachment: signature.asc
Description: OpenPGP digital signature

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