diff --git a/sys/src/kern/amd64/dat.h b/sys/src/kern/amd64/dat.h index 07250a3..99c8523 100644 --- a/sys/src/kern/amd64/dat.h +++ b/sys/src/kern/amd64/dat.h @@ -256,7 +256,6 @@ struct Mach int pfault; int cs; int syscall; - int load; int intr; int mmuflush; /* make current proc flush it's mmu state */ int ilockdepth; @@ -324,6 +323,8 @@ struct Sys unsigned int pipeqsize; /* size in bytes of pipe queues */ int nuart; /* number of uart devices */ + int load; + char* architecture; uint64_t ticks; Mach* machptr[MACHMAX]; diff --git a/sys/src/kern/port/devcons.c b/sys/src/kern/port/devcons.c index e2ee72d..f2584b7 100644 --- a/sys/src/kern/port/devcons.c +++ b/sys/src/kern/port/devcons.c @@ -964,7 +964,7 @@ consread(Chan *c, void *buf, long n, int64_t off) bp += NUMSIZE; readnum(0, bp, NUMSIZE, mp->tlbpurge, NUMSIZE); bp += NUMSIZE; - readnum(0, bp, NUMSIZE, mp->load, NUMSIZE); + readnum(0, bp, NUMSIZE, sys->load, NUMSIZE); bp += NUMSIZE; readnum(0, bp, NUMSIZE, (mp->perf.avg_inidle*100)/mp->perf.period, diff --git a/sys/src/kern/port/proc.c b/sys/src/kern/port/proc.c index 57ea239..9ae53a8 100644 --- a/sys/src/kern/port/proc.c +++ b/sys/src/kern/port/proc.c @@ -291,7 +291,7 @@ reprioritize(Proc *p) { int fairshare, n, load, ratio; - load = sys->machptr[0]->load; + load = sys->load; if(load == 0) return p->basepri; @@ -1780,5 +1780,5 @@ accounttime(void) n = nrun; nrun = 0; n = (nrdy+n)*1000; - m->load = (m->load*(HZ-1)+n)/HZ; + sys->load = (sys->load*(HZ-1)+n)/HZ; }