On Sun, Nov 06, 2011 at 08:39:46AM +0000, Chris Wilson wrote: > On Sun, 6 Nov 2011 01:41:35 +0100, Daniel Vetter <[email protected]> > wrote: > > Use a combination of atomic_t and a spinlocked slow-path to make most > > writes fast. > > What happened to the rule that this was protected by struct_mutex? > Did you find a violation? Or is this step 1 in the hundred step plan to > clarify and fix the locking around register access?
The real problem is the read side, which isn't really protected by struct_mutex everywhere. And we can't change that because we want to capture the error_state without taking struct_mutex. Somehow I've gotten a bit overenthusiastic about all this and decided to start with that 5 year plan to clean up our locking around register access. After some more thinking this morning I've noticed that my trick is fundamentally racy. Before I embarass myself even more I'll drop this patch and just resend the read side locking fix so that the hangcheck won't kill my machine anymore. -Daniel -- Daniel Vetter Mail: [email protected] Mobile: +41 (0)79 365 57 48 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
