pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/x11/modular-xorg-server inspired by a change in trunk/...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/9b26b250e646
branches:  trunk
changeset: 556661:9b26b250e646
user:      drochner <drochner%pkgsrc.org@localhost>
date:      Thu Mar 26 20:02:45 2009 +0000

description:
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

diffstat:

 x11/modular-xorg-server/Makefile         |   4 +-
 x11/modular-xorg-server/distinfo         |   3 +-
 x11/modular-xorg-server/patches/patch-am |  92 ++++++++++++++++++++++++++++++++
 3 files changed, 96 insertions(+), 3 deletions(-)

diffs (128 lines):

diff -r 07428d0124d6 -r 9b26b250e646 x11/modular-xorg-server/Makefile
--- a/x11/modular-xorg-server/Makefile  Thu Mar 26 19:05:29 2009 +0000
+++ b/x11/modular-xorg-server/Makefile  Thu Mar 26 20:02:45 2009 +0000
@@ -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 -r 07428d0124d6 -r 9b26b250e646 x11/modular-xorg-server/distinfo
--- a/x11/modular-xorg-server/distinfo  Thu Mar 26 19:05:29 2009 +0000
+++ b/x11/modular-xorg-server/distinfo  Thu Mar 26 20:02:45 2009 +0000
@@ -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-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 -r 07428d0124d6 -r 9b26b250e646 x11/modular-xorg-server/patches/patch-am
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/x11/modular-xorg-server/patches/patch-am  Thu Mar 26 20:02:45 2009 +0000
@@ -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



Home | Main Index | Thread Index | Old Index