public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* RT : 2.6.12rc5 + realtime-preempt-2.6.12-rc5-V0.7.47-15
@ 2005-05-31 14:53 Serge Noiraud
  2005-05-31 19:47 ` Lee Revell
  0 siblings, 1 reply; 7+ messages in thread
From: Serge Noiraud @ 2005-05-31 14:53 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ingo Molnar

[-- Attachment #1: Type: text/plain, Size: 496 bytes --]

I have a test program which made a loop in RT to mesure the system
perturbation.
It works finely in a tty environment.
When I run it in an X environment ( xterm ), I get something like if I
click the Enter key in the active window.
If I open a new xterm, this is the new active window which receive these
events.
These events stop when the program stop.

I tried with X in RT and no RT : I have the problem.

I send you the program in copy to reproduce.
I have this problem in all version of RT.

[-- Attachment #2: test_tsc.c --]
[-- Type: text/x-c, Size: 2401 bytes --]

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "fonctions.h"

#include <stdio.h>
#include <unistd.h>
#include <sys/mman.h> /* for mmap and MCL_CURRENT */
#include <stdlib.h> /* for atoi */
#include <asm/msr.h> /* for rdtsc */

#define __USE_GNU 
#include <sched.h> /* for sched_xxxx */

//#define NB_TEST 60000000000ULL
#define NB_TEST 60000000ULL

float get_cpu_clock_speed()
{
  FILE *fp;
  char buffer[1024];
  size_t bytes_read;
  char *match;
  float clock_speed;

  fp = fopen ("/proc/cpuinfo", "r");
  bytes_read = fread (buffer, 1, sizeof (buffer), fp);
  fclose (fp);
  if (bytes_read == 0 || bytes_read == sizeof (buffer))
    return 0;
  buffer[bytes_read] = '\0';
  match = strstr (buffer, "cpu MHz");
  if (match == NULL)
    return 0;
  sscanf (match, "cpu MHz : %f", &clock_speed);
  return clock_speed;
}

int main(int argc,char **argv)
{
 unsigned long long max,dt;
 float frequency;
 int cptr;
 long long i;
 struct sched_param sched_param;
 double duree;
 union {
   unsigned long long total;
   struct {
     unsigned long MSL;
     unsigned long LSL;
   };
 } tempsdeb,tempsfin,t1,t2,tmax1,tmax2;
 cpu_set_t new_mask;
 pid_t p = 0;
 int ret;

  if (argc!=2)
  {
     fprintf(stderr,"Usage:%s <NUM_CPU>\n",argv[0]);
     return -1;
  }
  CPU_ZERO(&new_mask);
  CPU_SET(atoi(argv[1]),&new_mask);
  ret = sched_setaffinity(p,sizeof(cpu_set_t) , &new_mask);
  rdtsc(tempsdeb.MSL,tempsdeb.LSL);
  printf(" Start time %Lx \n",tempsdeb.total);
  sched_param.sched_priority =99;
  cptr = sched_setscheduler(getpid(), SCHED_FIFO,&sched_param );
  cptr = mlockall(MCL_CURRENT);
  printf("mlockall cptr %d\n",cptr);
 
 max=0;
 rdtsc(t1.MSL,t1.LSL);
 for (i = 0; i < NB_TEST; i++)
   {
	 rdtsc(t2.MSL,t2.LSL);
	 dt = t2.total - t1.total;
	 if ( dt > max) 
	 { max = dt;
	  tmax1.total = t1.total;
	  tmax2.total = t2.total;
	  }
	 t1.total = t2.total;
   }
 rdtsc(tempsfin.MSL,tempsfin.LSL);
 printf(" End time  %Lx \n",tempsfin.total);
 printf(" Max time 1  %Lx \n",tmax1.total);
 printf(" Max time 2  %Lx \n",tmax2.total);
 frequency = get_cpu_clock_speed();
  if (frequency == 0)
	  return -1;
 duree =((double) (tempsfin.total - tempsdeb.total))/(frequency*1000000);
 printf("Test duration is %f s max detected %.0f µs\n",duree,((double)max)/(frequency));

 return 0;
}

^ permalink raw reply	[flat|nested] 7+ messages in thread
* RT :  2.6.12rc5 + realtime-preempt-2.6.12-rc5-V0.7.47-15
@ 2005-06-06 12:12 Serge Noiraud
  0 siblings, 0 replies; 7+ messages in thread
From: Serge Noiraud @ 2005-06-06 12:12 UTC (permalink / raw)
  To: linux-kernel

Could someone explains me the following error with : hda: lost interrupt
What can I do ?
When hda error occurs, the was one RT process doing nothing with disks.

following the end od dmesg

 (     ksoftirqd/0-3    |#0): new 15 us maximum-latency wakeup.
 (     ksoftirqd/1-6    |#1): new 16 us maximum-latency wakeup.
 (     ksoftirqd/1-6    |#1): new 20 us maximum-latency wakeup.
 (     ksoftirqd/0-3    |#0): new 22 us maximum-latency wakeup.
 (            bash-11002|#0): new 30 us maximum-latency wakeup.
 (             gpm-5508 |#0): new 31 us maximum-latency wakeup.
 hda: dma_timer_expiry: dma status == 0x24
 hda: DMA interrupt recovery
 hda: lost interrupt
 (     ksoftirqd/0-3    |#0): new 33 us maximum-latency wakeup.
 (       desched/0-4    |#0): new 37 us maximum-latency wakeup.
 (     ksoftirqd/0-3    |#0): new 48 us maximum-latency wakeup.



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-06-06 12:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-31 14:53 RT : 2.6.12rc5 + realtime-preempt-2.6.12-rc5-V0.7.47-15 Serge Noiraud
2005-05-31 19:47 ` Lee Revell
2005-06-01  8:07   ` Serge Noiraud
2005-06-01  8:23     ` Ingo Molnar
2005-06-01 12:02       ` Serge Noiraud
2005-06-01 13:09         ` Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2005-06-06 12:12 Serge Noiraud

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox