kernel: calcru: runtime went backwards

Stephen Montgomery-Smith stephen at math.missouri.edu
Sun Nov 6 12:30:42 PST 2005


This is on a recent FreeBSD-6.0 stable SMP machine.

As root, run "top -s0".  Then, at the same time run this program:

#include <pthread.h>
#define D (1<<10)
void *thread(void *n) {
   int i;
   double array[D];
   for (i=0;i<D;i++) array[i] = i;
}
int main() {
   void *i;
   pthread_t tid;
   while (1) {
     pthread_create(&tid,NULL,thread,i);
     pthread_join(tid,&i);
   }
}

Let this program run for about a minute.  Then kill this program.

At this point, I sometimes get some calcru messages from the kernel.

(This is not a contrived situation - this happens much more frequently 
than this sample program when I run programs with threaded fftw3 calls - 
I suspect that it throws off the cpu times shown by top.)

Stephen


More information about the freebsd-stable mailing list