diff options
author | drochner <drochner@pkgsrc.org> | 2009-03-26 20:02:45 +0000 |
---|---|---|
committer | drochner <drochner@pkgsrc.org> | 2009-03-26 20:02:45 +0000 |
commit | cb580f083608e9c06d5ea680471cda45928428e5 (patch) | |
tree | 6b3a18f1314e543defb90e6323fd7fb0f3ae7dbc | |
parent | fd1a99ea0a4e531ca99655f67fa041b13e7c5140 (diff) | |
download | pkgsrc-cb580f083608e9c06d5ea680471cda45928428e5.tar.gz |
inspired by a change in trunk/xsrc:
pull in a patch from upstream which fixes wakeup storms in idletime
counter, reducing the system load significantly if a recent
gnome-screensaver in run
bump PKGREVISION
-rw-r--r-- | x11/modular-xorg-server/Makefile | 4 | ||||
-rw-r--r-- | x11/modular-xorg-server/distinfo | 3 | ||||
-rw-r--r-- | x11/modular-xorg-server/patches/patch-am | 92 |
3 files changed, 96 insertions, 3 deletions
diff --git a/x11/modular-xorg-server/Makefile b/x11/modular-xorg-server/Makefile index f590b3a5db9..c4e7ecd27c0 100644 --- a/x11/modular-xorg-server/Makefile +++ b/x11/modular-xorg-server/Makefile @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.40 2009/03/14 09:46:55 apb Exp $ +# $NetBSD: Makefile,v 1.41 2009/03/26 20:02:45 drochner Exp $ # DISTNAME= xorg-server-1.4.2 PKGNAME= modular-${DISTNAME} -PKGREVISION= 5 +PKGREVISION= 6 CATEGORIES= x11 MASTER_SITES= ${MASTER_SITE_XORG:=xserver/} EXTRACT_SUFX= .tar.bz2 diff --git a/x11/modular-xorg-server/distinfo b/x11/modular-xorg-server/distinfo index 188c76b6285..c473c143997 100644 --- a/x11/modular-xorg-server/distinfo +++ b/x11/modular-xorg-server/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.31 2009/03/14 09:46:55 apb Exp $ +$NetBSD: distinfo,v 1.32 2009/03/26 20:02:45 drochner Exp $ SHA1 (Mesa-7.0.4-xorg-server_GL) = 6aed65e64c7a684a5d707334a4b4fe7711966380 RMD160 (Mesa-7.0.4-xorg-server_GL) = 2028532d79f5bba1d09ae787a1799fc4b206a5d7 @@ -24,6 +24,7 @@ SHA1 (patch-ai) = 936edba9ac60e7dd461c2c1d54e1b89c6bf16027 SHA1 (patch-aj) = 84ff5c6215d0b62734cf26e78394a70afe2b7007 SHA1 (patch-ak) = df6d3b2172254e1f9d44eb40144cad5ed29a7d1d SHA1 (patch-al) = cb1fb44037f23fb2838ed36aaf2591946264fe53 +SHA1 (patch-am) = 609821a859d395a738bcd1389787f6938fcbd8c3 SHA1 (patch-sa) = 5586e998e2239b6851291b5f79b2e6009c78b174 SHA1 (patch-sb) = b769780b446e4f10bc99ccd3373d666daf44f863 SHA1 (patch-sc) = 33c4d4731e3732032f84946fc17e28d0cba389a6 diff --git a/x11/modular-xorg-server/patches/patch-am b/x11/modular-xorg-server/patches/patch-am new file mode 100644 index 00000000000..dec90b16eec --- /dev/null +++ b/x11/modular-xorg-server/patches/patch-am @@ -0,0 +1,92 @@ +$NetBSD: patch-am,v 1.3 2009/03/26 20:02:45 drochner Exp $ + +--- Xext/sync.c.orig 2008-06-10 19:57:18.000000000 +0200 ++++ Xext/sync.c +@@ -2533,7 +2533,7 @@ SyncInitServerTime(void) + * IDLETIME implementation + */ + +-static pointer IdleTimeCounter; ++static SyncCounter *IdleTimeCounter; + static XSyncValue *pIdleTimeValueLess; + static XSyncValue *pIdleTimeValueGreater; + +@@ -2545,38 +2545,69 @@ IdleTimeQueryValue (pointer pCounter, CA + } + + static void +-IdleTimeBlockHandler (pointer env, +- struct timeval **wt, +- pointer LastSelectMask) ++IdleTimeBlockHandler(pointer env, struct timeval **wt, pointer LastSelectMask) + { +- XSyncValue idle; ++ XSyncValue idle, old_idle; ++ SyncTriggerList *list = IdleTimeCounter->pTriglist; ++ SyncTrigger *trig; + + if (!pIdleTimeValueLess && !pIdleTimeValueGreater) + return; + ++ old_idle = IdleTimeCounter->value; + IdleTimeQueryValue (NULL, &idle); ++ IdleTimeCounter->value = idle; /* push, so CheckTrigger works */ + + if (pIdleTimeValueLess && + XSyncValueLessOrEqual (idle, *pIdleTimeValueLess)) + { +- AdjustWaitForDelay (wt, 0); ++ /* ++ * We've been idle for less than the threshold value, and someone ++ * wants to know about that, but now we need to know whether they ++ * want level or edge trigger. Check the trigger list against the ++ * current idle time, and if any succeed, bomb out of select() ++ * immediately so we can reschedule. ++ */ ++ ++ for (list = IdleTimeCounter->pTriglist; list; list = list->next) { ++ trig = list->pTrigger; ++ if (trig->CheckTrigger(trig, old_idle)) { ++ AdjustWaitForDelay(wt, 0); ++ break; ++ } ++ } + } + else if (pIdleTimeValueGreater) + { +- unsigned long timeout = 0; ++ /* ++ * There's a threshold in the positive direction. If we've been ++ * idle less than it, schedule a wakeup for sometime in the future. ++ * If we've been idle more than it, and someone wants to know about ++ * that level-triggered, schedule an immediate wakeup. ++ */ ++ unsigned long timeout = -1; + +- if (XSyncValueLessThan (idle, *pIdleTimeValueGreater)) +- { ++ if (XSyncValueLessThan (idle, *pIdleTimeValueGreater)) { + XSyncValue value; + Bool overflow; + + XSyncValueSubtract (&value, *pIdleTimeValueGreater, + idle, &overflow); +- timeout = XSyncValueLow32 (value); ++ timeout = min(timeout, XSyncValueLow32 (value)); ++ } else { ++ for (list = IdleTimeCounter->pTriglist; list; list = list->next) { ++ trig = list->pTrigger; ++ if (trig->CheckTrigger(trig, old_idle)) { ++ timeout = min(timeout, 0); ++ break; ++ } ++ } + } + + AdjustWaitForDelay (wt, timeout); + } ++ ++ IdleTimeCounter->value = old_idle; /* pop */ + } + + static void |