Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Nov 2007 17:51:26 -0700 (PDT)
From:      Nate Eldredge <nge@cs.hmc.edu>
To:        Marek Blaszkowski <mb@kis.p.lodz.pl>
Cc:        freebsd-amd64@freebsd.org
Subject:   Re: strange i/o and tty lockups/delays on 6.1, strange sync() issue - updated - slow sata disk writes?
Message-ID:  <Pine.LNX.4.64.0711021737250.31199@knuth.cs.hmc.edu>
In-Reply-To: <472B5111.8010109@kis.p.lodz.pl>
References:  <4728906E.8020804@kis.p.lodz.pl> <Pine.LNX.4.64.0710311048450.31199@knuth.cs.hmc.edu> <472B2FBB.5070308@kis.p.lodz.pl> <472B5111.8010109@kis.p.lodz.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
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@cs.hmc.edu



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.64.0711021737250.31199>