[PATCH] mieq: Provide better adaptability and diagnostics during mieq overflow

Keith Packard keithp at keithp.com
Sun Oct 16 18:50:59 PDT 2011


On Sun, 16 Oct 2011 13:47:42 -0700, Jeremy Huddleston <jeremyhu at apple.com> wrote:

> No.  miEventQueue.q_size is the number of buckets.  (miEventQueue.tail
> - miEventQueue.head) is the number of filled buckets (modulo number of
> buckets).

Right, but you only call this function when the queue is full, so those
should be the same?

> % is undefined for negative numbers?  WTF?  That's the first time I've
> heard that.  It's certainly well defined in mathematics.

Welcome to C, which lets the underlying hardware define this
behavior -- hardware gets it wrong consistently enough that the X server
defines a 'modulus' macro that takes advantage of the normal (broken)
hardware behavior to provide a true modulus.

> That's why we shut up after DROP_BACKTRACE_MAX reports.  What about lowering DROP_BACKTRACE_MAX to 5 rather than 20?

Right. No, I don't care how much we spam, as long as the spam is finite.

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20111016/3671c9c1/attachment.pgp>


More information about the xorg-devel mailing list