Some questions regarding locks

2004-05-22 Thread Nicolai Haehnle
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 It seems to me as if DRM(unlock) in drm_drv.h unlocks without checking whether the caller actually holds the global lock. There is no LOCK_TEST_WITH_RETURN or similar, and the helper function lock_transfer has no check in it either. Did I miss somet

Re: Some questions regarding locks

2004-05-22 Thread Keith Whitwell
Nicolai Haehnle wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 It seems to me as if DRM(unlock) in drm_drv.h unlocks without checking whether the caller actually holds the global lock. There is no LOCK_TEST_WITH_RETURN or similar, and the helper function lock_transfer has no check in it ei

Re: Some questions regarding locks

2004-05-22 Thread Mike Mestnik
Lets just say that this is good fault tolorance. What ever can go wrong will, all drivers are faulty. This sounds like a good idea and should be implemented for ordinary use or something like it. Unless you thing we should KP on a lock being held for more then a given time(30 seconds)? --- Keit

Re: Some questions regarding locks

2004-05-22 Thread Keith Whitwell
Mike Mestnik wrote: Lets just say that this is good fault tolorance. What ever can go wrong will, all drivers are faulty. This sounds like a good idea and should be implemented for ordinary use or something like it. Unless you thing we should KP on a lock being held for more then a given time(30

Re: Some questions regarding locks

2004-05-22 Thread Mike Mestnik
--- Keith Whitwell <[EMAIL PROTECTED]> wrote: > Mike Mestnik wrote: > > Lets just say that this is good fault tolorance. What ever can go > wrong > > will, all drivers are faulty. This sounds like a good idea and should > be > > implemented for ordinary use or something like it. > > > > Unless

Re: Some questions regarding locks

2004-05-22 Thread Keith Whitwell
Also, when the VT is switched away from the X server, I believe that the hardware lock remains grabbed - for minutes or hours at a time. This is a multi-user OS bug. I'l not even pretend it's a feature that we should keep. Just making you aware of the issues. Keith --

Re: Some questions regarding locks

2004-05-22 Thread Michel Dänzer
On Sat, 2004-05-22 at 14:04, Nicolai Haehnle wrote: > > It seems to me as if DRM(unlock) in drm_drv.h unlocks without checking > whether the caller actually holds the global lock. There is no > LOCK_TEST_WITH_RETURN or similar, and the helper function lock_transfer has > no check in it either.

Re: Some questions regarding locks

2004-05-22 Thread Ian Romanick
Nicolai Haehnle wrote: I think the simplest solution would look something like this: Whenever DRM(lock) is called by a privileged client (i.e. the X server), and it needs to sleep because the lock is held by an unprivileged client, a watchdog timer is started before we schedule. DRM(unlock) uncon

[patch] Re: Some questions regarding locks

2004-05-23 Thread Nicolai Haehnle
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Saturday 22 May 2004 16:04, Michel DÃnzer wrote: > On Sat, 2004-05-22 at 14:04, Nicolai Haehnle wrote: > > It seems to me as if DRM(unlock) in drm_drv.h unlocks without checking > > whether the caller actually holds the global lock. There is no >

Re: [patch] Re: Some questions regarding locks

2004-05-23 Thread Michel Dänzer
On Sun, 2004-05-23 at 12:05, Nicolai Haehnle wrote: > > > This sounds like an idea for you to play with, but I'm afraid it won't > > be useful very often in my experience: > > > > * getting rid of the offending client doesn't help with a wedged > > chip (some way to recover from tha

Re: [patch] Re: Some questions regarding locks

2004-05-25 Thread Nicolai Haehnle
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I've attached a new version of the patch. This should fix a minor bug: I put the call to init_timer() too late, which resulted in a kernel warning when the module was loaded/unloaded without actually being used. On Sunday 23 May 2004 14:37, Michel D