diff options
Diffstat (limited to 'parallel/glunix/patches/patch-aj')
-rw-r--r-- | parallel/glunix/patches/patch-aj | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/parallel/glunix/patches/patch-aj b/parallel/glunix/patches/patch-aj index 6b8780009d4..3f6a0cafa9c 100644 --- a/parallel/glunix/patches/patch-aj +++ b/parallel/glunix/patches/patch-aj @@ -1,8 +1,8 @@ -$NetBSD: patch-aj,v 1.2 2000/05/27 09:53:37 wiz Exp $ +$NetBSD: patch-aj,v 1.3 2000/06/16 23:40:17 wiz Exp $ --- glunix/src/idle/didle_sysinfo.cc.orig Thu Sep 18 21:04:55 1997 -+++ glunix/src/idle/didle_sysinfo.cc Fri May 26 14:44:45 2000 -@@ -95,14 +95,29 @@ ++++ glunix/src/idle/didle_sysinfo.cc Sat Jun 17 01:07:46 2000 +@@ -95,14 +95,33 @@ #include <kvm.h> #include <nlist.h> #include <stdio.h> @@ -13,7 +13,11 @@ $NetBSD: patch-aj,v 1.2 2000/05/27 09:53:37 wiz Exp $ +#include <sys/param.h> +#include <sys/proc.h> +#include <miscfs/procfs/procfs.h> ++#if __NetBSD_Version__ < 104000200 +#include <vm/vm_swap.h> ++#else /* moved to sys in 1.4.2 */ ++#include <sys/swap.h> ++#endif +#include <sys/sysctl.h> +#else #include <sys/proc.h> @@ -32,7 +36,7 @@ $NetBSD: patch-aj,v 1.2 2000/05/27 09:53:37 wiz Exp $ #include "clist.h" #include "cidle.h" -@@ -120,12 +135,51 @@ +@@ -120,12 +139,51 @@ #define LOADDOUBLE(la) ((double)(la) / FSCALE) #define HASH(x) ((x) >> 1) @@ -85,7 +89,7 @@ $NetBSD: patch-aj,v 1.2 2000/05/27 09:53:37 wiz Exp $ /* definitions for indices in the nlist array */ #define X_AVENRUN 0 #define X_MPID 1 -@@ -165,11 +219,11 @@ +@@ -165,11 +223,11 @@ // These are offsets into kmem for the stats we need static ulong avenrunOffset, availrmemOffset, anoninfoOffset, swapfsOffset; @@ -99,7 +103,7 @@ $NetBSD: patch-aj,v 1.2 2000/05/27 09:53:37 wiz Exp $ static int cpuStates[NUM_CPUSTATES]; static int memoryStats[5]; static char *cpuStateNames[] = -@@ -237,6 +291,45 @@ +@@ -237,6 +295,45 @@ * * Side effects: *****************************************************************************/ @@ -145,7 +149,7 @@ $NetBSD: patch-aj,v 1.2 2000/05/27 09:53:37 wiz Exp $ Bool Idle_InitializeSysinfo(void) { -@@ -301,7 +394,7 @@ +@@ -301,7 +398,7 @@ return True; } @@ -154,7 +158,7 @@ $NetBSD: patch-aj,v 1.2 2000/05/27 09:53:37 wiz Exp $ /****************************************************************************** * Idle_CleanupSysinfo -- * Description of purpose and function of the procedure -@@ -333,18 +426,30 @@ +@@ -333,18 +430,30 @@ * * Side effects: *****************************************************************************/ @@ -186,7 +190,7 @@ $NetBSD: patch-aj,v 1.2 2000/05/27 09:53:37 wiz Exp $ /* Has this pid been recycled? Are we hitting a very old process? If so, then reset the entry */ if (usage < candidate->cpuUsage) { -@@ -353,7 +458,11 @@ +@@ -353,7 +462,11 @@ return candidate; } if (candidate->pid == -1) { @@ -198,7 +202,7 @@ $NetBSD: patch-aj,v 1.2 2000/05/27 09:53:37 wiz Exp $ candidate->cpuUsage = 0; return candidate; } -@@ -379,10 +488,17 @@ +@@ -379,10 +492,17 @@ * * Side effects: *****************************************************************************/ @@ -216,7 +220,7 @@ $NetBSD: patch-aj,v 1.2 2000/05/27 09:53:37 wiz Exp $ ASSERT(entry != NULL); entry->cpuUsage = usage; } -@@ -408,12 +524,24 @@ +@@ -408,12 +528,24 @@ void Idle_GetSysInfo(Idle_Load *total, Idle_Load *seq, List_List *glunixProcs) { @@ -241,7 +245,7 @@ $NetBSD: patch-aj,v 1.2 2000/05/27 09:53:37 wiz Exp $ static struct timeval lastTime = {0, 0}; struct timeval currTime; double alpha, beta; -@@ -459,6 +587,33 @@ +@@ -459,6 +591,33 @@ vmInUse[TOTAL] = 0; vmInUse[SEQUENTIAL] = 0; cpuUsage[TOTAL] = 0; cpuUsage[SEQUENTIAL] = 0; numProcs = 0; @@ -275,7 +279,7 @@ $NetBSD: patch-aj,v 1.2 2000/05/27 09:53:37 wiz Exp $ rewinddir(procdir); while ((direntp = readdir(procdir)) != 0) { -@@ -493,6 +648,7 @@ +@@ -493,6 +652,7 @@ (void) close(fd); numProcs++; } @@ -283,7 +287,7 @@ $NetBSD: patch-aj,v 1.2 2000/05/27 09:53:37 wiz Exp $ total->mem = activeMemory[TOTAL]; total->cpu = cpuUsage[TOTAL]; seq->mem = activeMemory[SEQUENTIAL]; -@@ -503,10 +659,21 @@ +@@ -503,10 +663,21 @@ void Idle_GetSystemInfo(Idle_SystemLoad *sysLoad) { @@ -307,7 +311,7 @@ $NetBSD: patch-aj,v 1.2 2000/05/27 09:53:37 wiz Exp $ if (kd == NULL) { sysLoad->loadAvg[0] = 0; -@@ -515,7 +682,48 @@ +@@ -515,7 +686,48 @@ sysLoad->memory = 0; return; } @@ -356,7 +360,7 @@ $NetBSD: patch-aj,v 1.2 2000/05/27 09:53:37 wiz Exp $ /* get load average array */ ReadKernelData(avenrunOffset, (char *) avenrun, sizeof (avenrun)); // -@@ -539,6 +747,7 @@ +@@ -539,6 +751,7 @@ sysLoad->memory = PAGETOK(MAX(ani_max - ani_resv, 0) + availrmem - swapfs_minfree); |