[PATCH 2/2 v4] mieq: Reserve some space in EQ for release and other special events
Jeremy Huddleston
jeremyhu at apple.com
Sun Oct 16 22:19:14 PDT 2011
On Oct 16, 2011, at 10:12 PM, Keith Packard wrote:
> On Sun, 16 Oct 2011 21:16:13 -0700, Jeremy Huddleston <jeremyhu at apple.com> wrote:
>>
>> The last 64 events in the event queue will be reserved for release
>> events in order to help return the system to a cleaner state when
>> it comes back from a soft wedge.
>
> Yeah, seems reasonable to me.
>
>> /* Queue size must be a power of 2 */
>> -#define QUEUE_INITIAL_SIZE 128
>> +#define QUEUE_INITIAL_SIZE 256
>
> Just noticed this -- I don't see any place which requires a power of two
> initial size.
Yeah, that's probably true actually. It just doubles in size, but there's nothing that actually requires it to be a power of 2. The only thing that is required for this to behave right is that max == initial * 2^i for some i. But if that's not true, it just means that the queue can grow one step above max before it is stopped from growing.
I'll just remove the comment.
--Jeremy
More information about the xorg-devel
mailing list