Re: [PATCH V2 6/6] drm/i915:Use the coarse ping-pong mechanism based on drm fd to dispatch the BSD command on BDW GT3

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

 



On Mon, Apr 14, 2014 at 04:05:19PM +0800, Zhao Yakui wrote:
> On Mon, 2014-04-14 at 01:22 -0600, Daniel Vetter wrote:
> > You're still using atomic_t for no real good reason.
> > gen8_dispatch_bsd_ring is always called with the dev->struct_mutex lock
> > held, so there's really no reason for it.
> 
> If the struct_mutex is used in the gen8_dispatch_bsd_ring, I can remove
> the atomic_t. 
> It seems that the struct_mutex is a big lock and it is used very
> frequently(i915_gem.c, i915_dma.c and so on). In my point it is a little
> heavier than the atomic_t if one counter is increased and returned. 
> 
> If you think that the mutex is better than atomic, I will follow your
> advice.

You are already holding the struct_mutex whenever we touch the ring and
execbuffer. Even in a fine-grained world, there will still be a mutex
around all operations that touch the rings.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux