Re: [PATCH 2/2] drm: Serialise multiple event readers

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

 



On Wed, Nov 25, 2015 at 03:44:04PM +0100, Thomas Hellstrom wrote:
> Do you need to take the mutex around other event pullers as well?

We would. I checked in drm/*.c for other users, but not the drivers.
A quick git grep doesn't show any likely candidates, they appear to be
private event lists.

> So that no such process thinks it has pulled all events and then
> suddenly an event reappears?

A short read just implies that the kernel returned all the events it
has. That doesn't imply any new ones haven't manifested in the time it
takes you to see the new events. (You either call read again until it
EAGAINs, or go back to poll.)

> I think there was some event pulling code in one of the drivers, but I
> might be wrong.

I hope not...

> The close() code should be safe against this.

I checked through drm_release and decided that since it cannot happen
whilst drm_read() is active and so I didn't need to worry about having
to break the lock or stop the read.

Anything else of concern?
-Chris

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




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux