On Sat, 14 Jan 2012 13:12:07 +0100, Daniel Vetter <dan...@ffwll.ch> wrote:

> I think that race is air-tight with your patch to rework the reset code
> already. But better safe than sorry. And as I've said a good cleanup
> anyway.

Sounds good. I like clearer code, especially when it doesn't cost
performance. I think I'd like my version in -fixes so that we don't
change anything with -next; no reason to have two slightly different
versions out there in case one (or the other) is broken?

> One of the reasons Chris originally shot down Ben's forcewake patches
> which protected everything with a spinlock (i.e. also writes) is the
> overhead. And writes to advance the ring are actually rather common. Iirc
> Chris even wrote a patch to cut down on the overhead by caching the fifo
> count. So I think we actually want this asymmetry in locking for
> performance reasons.

Ah, that's a good reason to use different locking for each path
then. Suitable documentation, and a WARN_ON in the write path to check
for the struct_mutex should suffice to prevent mistakes in the future.

-- 
keith.pack...@intel.com

Attachment: pgp6vk6YaX0uW.pgp
Description: PGP signature

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to