strange i/o and tty lockups/delays on 6.1, strange sync() issue - updated - slow sata disk writes?

Nate Eldredge nge at cs.hmc.edu
Fri Nov 2 17:51:49 PDT 2007


On Fri, 2 Nov 2007, Marek Blaszkowski wrote:

> Hi, I done more tests, it's looks like for unknown reason bootleneck is 
> (maybe) sata controller (?).

Are you sure it's only disk access that causes the stall?  I ran a test 
program like the following; it reports whenever it's scheduled out for 
more than argv[1] microseconds.  You could also try running it in single 
user mode for a minimum of disk activity.  If you want to get really 
involved you could boot from a ramdisk or something.

Btw, regarding PREEMPTION: I don't know if it is "officially" safe or not. 
I haven't had any problems using it on my box, but it's not particularly 
heavily loaded either.

Have you tried disabling ACPI yet?

#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/time.h>

int main(int argc, char *argv[])
{
   long t;
   struct timeval old,new;
   if (argv[1])
     t = atol(argv[1]);
   else
     t = 0;
   gettimeofday(&old,NULL);
   while (1)
     {
       long diff;
       gettimeofday(&new, NULL);
       diff = (new.tv_sec - old.tv_sec) * 1000000 + (new.tv_usec - 
old.tv_usec);
       if (diff >= t)
         printf("%ld\n",diff);
       old = new;
     }
   return 0;
}

-- 
Nate Eldredge
nge at cs.hmc.edu


More information about the freebsd-amd64 mailing list