From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Fri, 13 Aug 2010 15:17:37 +0100 (BST) From: edward.robbins@domain.hid MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_20100813151737000000_56891" Message-ID: <1281709057.650414331@domain.hid> Subject: [Xenomai-help] Very high latencies under stress testing List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: xenomai@xenomai.org ------=_20100813151737000000_56891 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello all,=0A=0AI have just set up my first xenomai system, and though I be= lieve I have followed most of the guidelines, if I run latency it sits at a= round 8uS max, until I run something to stress the system (e.g. startx, or = killing the x server) when it jumps to 700-800uS.=0A=0AI wonder if this is = to do with graphics? I have set "NoAccel" in the driver section of Xorg.con= f (I am using fbdev). I also notice that latencies go massive (e.g. 4200uS)= the first time I run glxgears. "glxinfo" reports "Direct rendering: no".= =0A=0AThis is a core 2 duo system (MEN F19P cPCI) with ICH9M-SFF chipset. I= am running debian (lenny) and have followed the guide in the wiki (here: h= ttp://www.xenomai.org/index.php/Building_Debian_packages) to install kernel= 2.6.32.15 and xenomai 2.5.4. I have made the following selections for kern= el configuration in order to try and prevent latency issues:=0A=0AProcessor= type and features:=0A Enable interrupt pipeline=0A Enable = high resolution timer support=0A Disable dell laptop support=0A = Processor family --> Core 2/Newer Xeon=0A Preemption model -->= Preemptible kernel (low latency desktop)=0A=0ABus options (PCI etc):=0A = Disable PCI express hotplug driver=0A Disable message signall= ed interrupts (MSI and MSI-X)=0A Disable PCCard (PCMCIA/Cardbus sup= port)=0A Disable support for PCI hotplug=0A=0ADevice drivers:=0A = Disable Memory Technology Device (MTD) support=0A Disable Fus= ion MPT device support=0A Disable I20 device support=0A Dis= able ISDN support=0A=0APower management options (ACPUI, APM):=0A Di= sable ACPI (Advanced Configuration and Power Interface) Support --> Process= or=0A Disable CPU Frequency Scaling=0A Disable CPU idle PM = support=0A Disable Power Managment Support=0A=0AReal-time sub-syste= m:=0A Enable Machine--> SMI workaround =0A Enable Machine--= > globally disable SMI=0A=0AI have read through this: http://svn.gna.org/sv= n/xenomai/trunk/TROUBLESHOOTING and tried to find anything relevant. I am b= ooting from an on board compact flash via USB. I wondered if this could be = the problem. Output of hdparm:=0A=0Ahdparm -v /dev/sda=0A=0Areadonly =3D 0 = (off)=0Areadahead =3D 256 (on)=0Ageometry =3D 1024/255/63, sectors =3D 3122= 7840, start =3D 0=0A=0Ahdparm -acdgkmur /dev/sda=0A=0AHDIO_GET_MULTICOUNT f= ailed: Invalid argument=0AHDIO_GET_32BIT failed: Invalid argument=0AHDIO_GE= T_UNMASKINTR failed: Invalid argument=0AHDIO_GET_DMA failed: Invaid argumen= t=0AHDIO_GET_KEEPSETTINGS failed: Invalid argument=0A(reast of output same = as hdparm -v)=0A=0Ahdparm -t /dev/sda=0A=0A/dev/sda:=0ATiming buffered disk= reads: 100MB in 3.01 seconds =3D 33.24 MB/sec=0A=0Ahdparm -T /dev/sda=0A= =0A/dev/sda:=0ATiming cached reads: 11006 MB in 2.00 seconds =3D 5503.00 MB= /sec=0A=0AThen I did cat /proc/scsi/scsi:=0AHost: scsi4 Channel: 00 Id: 00 = Lun: 00=0A Vendor: Generic Model: Flash HS-CF Rev: 1.68=0A Type: = Direct-Access ANSI SCSI revision: 00=0A= =0AAlso, this embedded system has a lot of configuration options in the BIO= S (more than I have seen on any other system). Some seem like they could be= very useful but are currently unusable (e.g. if I set "SMI handler" to off= , the system will no longer boot from compact flash). There are also other = options that might be relevant. I have tried playing with them, but am not = even sure what some are and the manual is quite cryptic:=0A=0AIDE Controlle= r settings=0A "HDC configure as" Options: "IDE", "RAID", "AHCI"=0A= =0AUSB Configuration=0A "USB Legacy" Enable/Disable=0A "EHC= I1" Enable/Disable=0A "EHCI2" "=0A "UHCI1" = "=0A "UHCI2"=0A ...=0A "UHCI5"=0A "Pe= r-Port Control2" Enable/Disable=0A "USB Pre-fetch Feature" Enable/D= isable=0A "USB Pre-fetch Time" 2ms/4ms=0A "USB HC Alignment= " Enable/Disable=0A=0AChipset Configuration=0A "CRID/SRID" Enable/D= isable=0A "Port 80h Cycles" LPC bus/PCI bus=0A "DMI Link AS= PM Control" Enable/Disable=0A "Automatic ASMO" Auto/Manual=0A = "ASPM L0s Support" Enable/Disable=0A "ASPM L0sL1 Support" Enable= /Disable=0A "VT-d" Enable/Disable=0A=0AACPI Table/Feature Control= =0A "FACP - C2 Latency Value" Enable/Disable=0A "FACP - C3 = Latency Value" Enable/Disable=0A "FACP - RTC S4 Wakeup" Enable/Disa= ble=0A "APIC - IO APIC Mode" Enable/Disable=0A "HPET - HPET= Support" Enable/Disable=0A =0APCI Express Root Port 1/2/3/4/5/6 Se= ttings=0A "ASPM" Enable/Disable=0A "Automatic ASPM" Auto/Ma= nual=0A "ASPM L0s" Root&Endpoint Ports/ Disabled/ Root Port Only/ E= ndpoint port Only=0A "ASPM L1" Enable/Disable=0A "URR" Enab= le/Disable=0A "FER" Enable/Disable=0A "NFER" Enable/Disable= =0A "CER" Enable/Disable=0A "CTO" Enable/Disable=0A = "SEFE" Enable/Disable=0A "SENFE" Enable/Disable=0A "SECE" = Enable/Disable=0A "PME Interrupt" Enable/Disable=0A "PME SC= I" Enable/Disable=0A "Hot Plug SCI" Enable/Disable=0A=0AAdvanced CP= U Control=0A "P-States" Enable/Disable=0A "CMP Support" Ena= ble/Disable=0A "Vanderpool Technology" Enable/Disable=0A "S= MRR Support" Auto/Disable=0A "C-States" Enable/Disable=0A "= Enhanced C-States" Enable/Disable=0A "C-State Pop Up Mode" Enable/D= isable=0A "C-State Pop Down Mode" Enable/Disable=0A "C4 Exi= t Timing Mode" Fast/Slow/Default/Force Slow=0A "DeepC4" Enable/Disa= ble=0A "Hard C4E" Enable/Disable=0A "Enable C6" Enable/Disa= ble=0A "EMTTM" Enable/Disable=0A "Bi-directional PROCHOT#" = Enable/Disable=0A "ACPI 3.0 T-States" Enable/Disable=0A "DT= S" Enable/Disable"=0A ... (lots more options that I am not sure wha= t they really are for!)=0A=0APlatfoirm Power Management=0A "Storage= Break Event" Enable/Disable=0A "PCIE Break Event" Enable/Disable= =0A "PCI Break Event" Enable/Disable=0A "EHCI Break Event" = Enable/Disable=0A "UHCI Break Event" Enable/Disable=0A "HDA= Break Event" Enable/Disable=0A "ACPI S3" Enable/Disable=0A=0ASo, c= ould anyone suggest what I might try to improve the system? Sorry for the t= orrent of information... I thought it better to give as much info as I coul= d think of than to not provide enough to make a diagnosis!=0A=0AThanks,=0A= =0AEdward Robbins=0A=0AControl Systems Engineer=0AOxford Technologies Ltd= =0AUKAEA Culham=0AJoint European Torus, Remote Handling Division=0A ------=_20100813151737000000_56891 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello all,

I have just set up my fir= st xenomai system, and though I believe I have followed most of the guideli= nes, if I run latency it sits at around 8uS max, until I run something to s= tress the system (e.g. startx, or killing the x server) when it jumps to 70= 0-800uS.

I wonder if this is to do with graphics? I have set "NoAcce= l" in the driver section of Xorg.conf (I am using fbdev). I also notice tha= t latencies go massive (e.g. 4200uS) the first time I run glxgears. "glxinf= o" reports "Direct rendering: no".

This is a core 2 duo system (MEN = F19P cPCI) with ICH9M-SFF chipset. I am running debian (lenny) and have fol= lowed the guide in the wiki (here: http://www.xenomai.org/index.php/Buildin= g_Debian_packages) to install kernel 2.6.32.15 and xenomai 2.5.4. I have ma= de the following selections for kernel configuration in order to try and pr= event latency issues:

Processor type and features:
  &n= bsp;      Enable interrupt pipeline
  = ;       Enable high resolution timer support<= br>         Disable dell laptop sup= port
         Processor family -= -> Core 2/Newer Xeon
        = Preemption model --> Preemptible kernel (low latency desktop)

Bu= s options (PCI etc):
         Di= sable PCI express hotplug driver
      &nb= sp;  Disable message signalled interrupts (MSI and MSI-X)
 &nb= sp;       Disable PCCard (PCMCIA/Cardbus supp= ort)
         Disable support fo= r PCI hotplug

Device drivers:
      = ;   Disable Memory Technology Device (MTD) support
  = ;       Disable Fusion MPT device support
=          Disable I20 device support=
         Disable ISDN support
Power management options (ACPUI, APM):
    &nb= sp;    Disable ACPI (Advanced Configuration and Power Interf= ace) Support --> Processor
       =   Disable CPU Frequency Scaling
      = ;   Disable CPU idle PM support
     =     Disable Power Managment Support

Real-time sub-sys= tem:
         Enable Machine--&g= t; SMI workaround
         Enab= le Machine--> globally disable SMI

I have read through this: http= ://svn.gna.org/svn/xenomai/trunk/TROUBLESHOOTING and tried to find anything= relevant. I am booting from an on board compact flash via USB. I wondered = if this could be the problem. Output of hdparm:

hdparm -v /dev/sda
readonly =3D 0 (off)
readahead =3D 256 (on)
geometry =3D 1024/2= 55/63, sectors =3D 31227840, start =3D 0

hdparm -acdgkmur /dev/sda
HDIO_GET_MULTICOUNT failed: Invalid argument
HDIO_GET_32BIT failed= : Invalid argument
HDIO_GET_UNMASKINTR failed: Invalid argument
HDIO_= GET_DMA failed: Invaid argument
HDIO_GET_KEEPSETTINGS failed: Invalid ar= gument
(reast of output same as hdparm -v)

hdparm -t /dev/sda
=
/dev/sda:
Timing buffered disk reads: 100MB in 3.01 seconds =3D 33.2= 4 MB/sec

hdparm -T /dev/sda

/dev/sda:
Timing cached reads:= 11006 MB in 2.00 seconds =3D 5503.00 MB/sec

Then I did cat /proc/sc= si/scsi:
Host: scsi4 Channel: 00 Id: 00 Lun: 00
  Vendor: Generi= c  Model: Flash HS-CF        Rev: 1= .68
  Type:     Direct-Access   =             &nb= sp;            =   ANSI   SCSI revision: 00

Also, this embedded system= has a lot of configuration options in the BIOS (more than I have seen on a= ny other system). Some seem like they could be very useful but are currentl= y unusable (e.g. if I set "SMI handler" to off, the system will no longer b= oot from compact flash). There are also other options that might be relevan= t. I have tried playing with them, but am not even sure what some are and t= he manual is quite cryptic:

IDE Controller settings
  &= nbsp;      "HDC configure as" Options: "IDE", "RAI= D", "AHCI"

USB Configuration
      =    "USB Legacy" Enable/Disable
     &= nbsp;   "EHCI1" Enable/Disable
     &= nbsp;   "EHCI2"        &n= bsp;   "
         "UHC= I1"            "
=          "UHCI2"
  &nb= sp;      ...
     &nbs= p;   "UHCI5"
         = "Per-Port Control2" Enable/Disable
      &= nbsp;  "USB Pre-fetch Feature" Enable/Disable
   &nb= sp;     "USB Pre-fetch Time" 2ms/4ms
  &nb= sp;      "USB HC Alignment" Enable/Disable

= Chipset Configuration
         "= CRID/SRID" Enable/Disable
       &nbs= p; "Port 80h Cycles" LPC bus/PCI bus
      = ;   "DMI Link ASPM Control" Enable/Disable
   &= nbsp;     "Automatic ASMO" Auto/Manual
  &= nbsp;      "ASPM L0s Support" Enable/Disable
&n= bsp;        "ASPM L0sL1 Support" Enable/= Disable
         "VT-d" Enable/D= isable

ACPI Table/Feature Control
     &= nbsp;   "FACP - C2 Latency Value" Enable/Disable
  &= nbsp;      "FACP - C3 Latency Value" Enable/Disabl= e
         "FACP - RTC S4 Wakeup= " Enable/Disable
         "APIC = - IO APIC Mode" Enable/Disable
       = ;  "HPET - HPET Support" Enable/Disable
    &nb= sp;   
PCI Express Root Port 1/2/3/4/5/6 Settings
&nb= sp;        "ASPM" Enable/Disable
&nbs= p;        "Automatic ASPM" Auto/Manual         "ASPM L0s" Root&Endp= oint Ports/ Disabled/ Root Port Only/ Endpoint port Only
  &nb= sp;      "ASPM L1" Enable/Disable
  &= nbsp;      "URR" Enable/Disable
  &nb= sp;      "FER" Enable/Disable
   = ;      "NFER" Enable/Disable
   =       "CER" Enable/Disable
   &n= bsp;     "CTO" Enable/Disable
   &nbs= p;     "SEFE" Enable/Disable
    = ;     "SENFE" Enable/Disable
    = ;     "SECE" Enable/Disable
    =      "PME Interrupt" Enable/Disable
  &nbs= p;      "PME SCI" Enable/Disable
  &n= bsp;      "Hot Plug SCI" Enable/Disable

Adv= anced CPU Control
         "P-St= ates" Enable/Disable
         "C= MP Support" Enable/Disable
       &nb= sp; "Vanderpool Technology" Enable/Disable
     = ;    "SMRR Support" Auto/Disable
    =      "C-States" Enable/Disable
   &nb= sp;     "Enhanced C-States" Enable/Disable
 &nb= sp;       "C-State Pop Up Mode" Enable/Disabl= e
         "C-State Pop Down Mod= e" Enable/Disable
         "C4 E= xit Timing Mode" Fast/Slow/Default/Force Slow
    &n= bsp;    "DeepC4" Enable/Disable
    &= nbsp;    "Hard C4E" Enable/Disable
   &nbs= p;     "Enable C6" Enable/Disable
   =       "EMTTM" Enable/Disable
   =       "Bi-directional PROCHOT#" Enable/Disable
=          "ACPI 3.0 T-States" Enable= /Disable
         "DTS" Enable/D= isable"
         ... (lots more = options that I am not sure what they really are for!)

Platfoirm Powe= r Management
         "Storage B= reak Event" Enable/Disable
       &nb= sp; "PCIE Break Event" Enable/Disable
     &nbs= p;   "PCI Break Event" Enable/Disable
    =      "EHCI Break Event" Enable/Disable
  &= nbsp;      "UHCI Break Event" Enable/Disable
&n= bsp;        "HDA Break Event" Enable/Dis= able
         "ACPI S3" Enable/D= isable

So, could anyone suggest what I might try to improve the syst= em? Sorry for the torrent of information... I thought it better to give as = much info as I could think of than to not provide enough to make a diagnosi= s!

Thanks,

Edward Robbins

Control Systems Engineer
= Oxford Technologies Ltd
UKAEA Culham
Joint European Torus, Remote Han= dling Division
------=_20100813151737000000_56891--