[Xenomai-core] The scheduling jitter of Xenomai seems too large.

2011-03-29 Thread arethe.rtai
HI:
   I tested the scheduling jitter of xenomai on a Pentuim platform. The largest 
jitter near 260 micro second. The largest jitter of RTAI on the same hardware 
platform is only about 15 micro second. 
   Were some options configured wrong?
regards Arethe

2011-03-29 



arethe.rtai 
___
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core


Re: [Xenomai-core] The scheduling jitter of Xenomai seems too large.

2011-03-29 Thread Gilles Chanteperdrix
arethe.rtai wrote:
 HI:
I tested the scheduling jitter of xenomai on a Pentuim platform. The 
 largest jitter near 260 micro second. The largest jitter of RTAI on the same 
 hardware platform is only about 15 micro second. 
Were some options configured wrong?

Probably. The most probable culprit are debug options.

-- 
Gilles.

___
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core


Re: [Xenomai-core] MSI support in Xenomai

2011-03-29 Thread krishna m

rom: krishnamurth...@hotmail.com
To: gilles.chanteperd...@xenomai.org; jan.kis...@siemens.com
CC: xenomai-core@gna.org
Subject: RE: [Xenomai-core] MSI support in Xenomai
Date: Fri, 25 Mar 2011 17:51:06 +0530




 
From: krishnamurth...@hotmail.com
To: gilles.chanteperd...@xenomai.org; jan.kis...@siemens.com
Date: Tue, 22 Mar 2011 23:50:27 +0530
CC: xenomai-core@gna.org
Subject: Re: [Xenomai-core] MSI support in Xenomai



 Date: Tue, 22 Mar 2011 18:03:43 +0100
 From: gilles.chanteperd...@xenomai.org
 To: jan.kis...@siemens.com
 CC: krishnamurth...@hotmail.com; xenomai-core@gna.org
 Subject: Re: MSI support in Xenomai
 
 Jan Kiszka wrote:
  On 2011-03-22 16:55, krishna m wrote:
 
  Mar 22 21:12:47 localhost kernel: test_dev: Probe for device function=0
  Mar 22 21:12:47 localhost kernel: test_dev :15:00.0: found PCI INT A 
  - IRQ 10
  
  Here you get IRQ 10...
  
  Mar 22 21:12:47 localhost kernel: pci_bar = 0xfe00
  Mar 22 21:12:47 localhost kernel: Xenomai: RTDM: RT open handler is 
  deprecated, 
  driver requires update.
  Mar 22 21:12:47 localhost kernel: Xenomai: RTDM: RT close handler is 
  deprecated, 
  driver requires update.
  
  [ These messages also have a meaning, though unrelated to the crash. ]
  
  Mar 22 21:12:47 localhost kernel: test_dev: IRQ 16 successfully assigned 
  to the 
  device.
  
  ...but here IRQ 16 is assigned. Broken output or a real inconsistency?
  
  Also, where is the MSI? You should see log messages about MSI/MSI-X IRQ
  number assignment when properly enabling the support at PCI level.
 
 Maybe pci_enable_msi was called after request_irq ?
 
 
 -- 
 Gilles.
 
Just check my code:
i do enable MSI  (pci_enable_msi) before rtdm_irq_request pasted the code below 
part of my PCI probe function in the device driver:
 
..
rtdm_dev = kmalloc(sizeof(struct rtdm_device), GFP_KERNEL);
  if(!rtdm_dev) {
   printk(KERN_WARNING RUBICON: kmalloc failed\n);
   ret = -ENOMEM; //Insufficient storage space is available.
   goto fail_pci;
  }

  //copy the structure to the new memory
  memcpy(rtdm_dev, rubicon_rtdm_driver, sizeof(struct rtdm_device));

  //create filename
  snprintf(rtdm_dev-device_name,
   RTDM_MAX_DEVNAME_LEN, rtser%d, 0 /*i*/);
  rtdm_dev-device_id = 0; //i;

  //define two other members of the rtdm_device structure
  rtdm_dev-proc_name = rtdm_dev-device_name;
 
  ret = rtdm_dev_register(rtdm_dev);
  if(ret  0) {
   printk(KERN_WARNINGRUBICON: cannot register device\n);
   goto fail_pci;
  }
  g_rubicon_context.xen_device = rtdm_dev;
 
  ret = pci_enable_msi(dev);
  if(ret) {
   printk(RUBICON: Enabling MSI failed wuth error code: 0x%x\n, ret);
   goto fail_pci;
  }

  g_rubicon_context.irq = dev-irq; /* save the allocated IRQ */
  g_rubicon_context.dev = dev; /* Save the PCI queue h/w device ctx */
  dev_set_drvdata(dev,(void *) (g_rubicon_context));
  /* request the irq for the device */
  ret = rtdm_irq_request(g_rubicon_context.irq_handle,
 g_rubicon_context.irq,
 rubicon_irq_handler,
 RTDM_IRQTYPE_SHARED,
 rubicon,
 (void *)g_rubicon_context);

 
From IRQ number perspective:
Mar 22 21:12:47 localhost kernel: test_dev :15:00.0: found PCI INT A - IRQ 
10   is the print from the Kernel PCI Probe and 
Mar 22 21:12:47 localhost kernel: test_dev: IRQ 16 successfully assigned  
is my Print after enabling MSI and registering for irq.
 
I get the similar print with the Plain Linux kernel with the IRQ being assigned 
MSI enabled is irq 20. [Below i have pasted the kernel log of plain linux 
kernel]. I have tested the MSI interrupts and they work fine. 
Mar 22 23:47:49 localhost kernel: test_dev: Probe for device function=0
Mar 22 23:47:49 localhost kernel: test_dev :15:00.0: found PCI INT A - IRQ 
10
Mar 22 23:47:49 localhost kernel: pci_bar = 0xfe00 
Mar 22 23:47:49 localhost kernel: test_dev: IRQ 20 successfully assigned to the 
device.
Mar 22 23:47:49 localhost kernel: test_dev: Probe for device function=1
Mar 22 23:47:49 localhost kernel: test_dev: Successfully added test_dev Device 
Driver.
 
Just wanted to add 3 more questions:
1. Which versions of Linux, Adeos patch and xenomai are tested for stable MSI 
functionality ? Please let me know.
2. I am using the Xenomai Version linux-2.6.37, xenomai-2.5.6 and 
adeos-ipipe-2.6.37-x86-2.9-00. Is this combination fine ?
3. I looked at the /proc/interrupts and with out xenomai loaded [i.e. default 
linux kernel] I see my card beaing assigned MSI-EDGE interrupt and with xenomai 
kernel i don't see the entry in the /proc/interrupts but in /proc/xenomai/irq i 
see this entry 
IRQ   CPU0   
16:  0   test_drv
521: 0   [IPI]
524:869467   [timer]
525: 0   [critical sync]
546: 0   [virtual]
 
Hi Jan and Chanteperdrix,
Any thoughts or inputs on my updates of MSI not working ?
 
Thanks and 

Re: [Xenomai-core] MSI support in Xenomai

2011-03-29 Thread Gilles Chanteperdrix
krishna m wrote:
 Just wanted to add 3 more questions:
 1. Which versions of Linux, Adeos patch and xenomai are tested for stable MSI 
 functionality ? Please let me know.
 2. I am using the Xenomai Version linux-2.6.37, xenomai-2.5.6 and 
 adeos-ipipe-2.6.37-x86-2.9-00. Is this combination fine ?
 3. I looked at the /proc/interrupts and with out xenomai loaded [i.e. default 
 linux kernel] I see my card beaing assigned MSI-EDGE interrupt and with 
 xenomai kernel i don't see the entry in the /proc/interrupts but in 
 /proc/xenomai/irq i see this entry 
 IRQ   CPU0   
 16:  0   test_drv
 521: 0   [IPI]
 524:869467   [timer]
 525: 0   [critical sync]
 546: 0   [virtual]
  
 Hi Jan and Chanteperdrix,
 Any thoughts or inputs on my updates of MSI not working ?

Ok. Since you are asking me directly I am going to answer:
my point of view is, as I already told you, that MSI are not supported,
so still from my point of view the answer to question 1 is: none

Question 2 is yes, it is fine, but since MSI is not supported, it is not
supposed to work.

Answer to question 3 is that /proc/interrupts shows the interrupts
registered with request_irq whereas /proc/xenomai/irq shows the
interrupts which have been registered by xnintr_init, which
rtdm_request_irq uses. So, this is not the same code, the two files do
not have the same layout.

The reason why I did not answer is that Jan probably has a different
point of view for question 1, so, I let him answer you. But as far as I
know, Jan asked you some questions, in answer to your last post, to
which you did not answer.

-- 
Gilles.

___
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core