All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] NVIDIA Drivers w/ Xenomai
@ 2015-12-22  0:22 Eric Huang
  2015-12-22  2:43 ` Lennart Sorensen
  2015-12-22  7:37 ` Gilles Chanteperdrix
  0 siblings, 2 replies; 7+ messages in thread
From: Eric Huang @ 2015-12-22  0:22 UTC (permalink / raw)
  To: xenomai

Hi,

The specific question I am trying to answer is whether it is possible (at
all) to install an NVIDIA driver alongside Xenomai

My system is the following.

uname -a
Linux robot-Z68X-UD3H-B3 3.2.21-xenomai-2.6.1 #1 SMP Thu Jul 26 11:46:23
EDT 2012 x86_64 x86_64 x86_64 GNU/Linux

xeno-config --version
2.5.5.2

For more details, my application is a real-time controller which needs to
do image processing on a GPU. The image processing code executes at 500ms
on a CPU and 15ms on a GPU. The image frame rate is 30hz. The control loop
frequency is 500hz. The control loop is the only part which needs to be
hard RT.

If I can't install and run the NVIDIA driver at all on my system I will
look into a solution with a separate control and perception computer.

Thanks,
Eric

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

* Re: [Xenomai] NVIDIA Drivers w/ Xenomai
  2015-12-22  0:22 [Xenomai] NVIDIA Drivers w/ Xenomai Eric Huang
@ 2015-12-22  2:43 ` Lennart Sorensen
  2015-12-22  7:30   ` Gilles Chanteperdrix
  2015-12-22  7:37 ` Gilles Chanteperdrix
  1 sibling, 1 reply; 7+ messages in thread
From: Lennart Sorensen @ 2015-12-22  2:43 UTC (permalink / raw)
  To: Eric Huang; +Cc: xenomai

On Mon, Dec 21, 2015 at 07:22:26PM -0500, Eric Huang wrote:
> The specific question I am trying to answer is whether it is possible (at
> all) to install an NVIDIA driver alongside Xenomai
> 
> My system is the following.
> 
> uname -a
> Linux robot-Z68X-UD3H-B3 3.2.21-xenomai-2.6.1 #1 SMP Thu Jul 26 11:46:23
> EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
> 
> xeno-config --version
> 2.5.5.2

Wow that is really really old.

> For more details, my application is a real-time controller which needs to
> do image processing on a GPU. The image processing code executes at 500ms
> on a CPU and 15ms on a GPU. The image frame rate is 30hz. The control loop
> frequency is 500hz. The control loop is the only part which needs to be
> hard RT.
> 
> If I can't install and run the NVIDIA driver at all on my system I will
> look into a solution with a separate control and perception computer.

Since xenomai uses ipipe which changes the way IRQs are handled, the
fact you don't have source code to recompile the nvidia driver means you
can make the nvidia driver work correctly with ipipe, so if you have the
nvidia driver running you really have no idea if you will get real time
or not since the nvidia driver won't be following the rules.

At least that is how I have understood the situation.

-- 
Len Sorensen


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

* Re: [Xenomai] NVIDIA Drivers w/ Xenomai
  2015-12-22  2:43 ` Lennart Sorensen
@ 2015-12-22  7:30   ` Gilles Chanteperdrix
  2015-12-22 15:54     ` Lennart Sorensen
  0 siblings, 1 reply; 7+ messages in thread
From: Gilles Chanteperdrix @ 2015-12-22  7:30 UTC (permalink / raw)
  To: Lennart Sorensen; +Cc: xenomai

On Mon, Dec 21, 2015 at 09:43:04PM -0500, Lennart Sorensen wrote:
> On Mon, Dec 21, 2015 at 07:22:26PM -0500, Eric Huang wrote:
> > The specific question I am trying to answer is whether it is possible (at
> > all) to install an NVIDIA driver alongside Xenomai
> > 
> > My system is the following.
> > 
> > uname -a
> > Linux robot-Z68X-UD3H-B3 3.2.21-xenomai-2.6.1 #1 SMP Thu Jul 26 11:46:23
> > EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
> > 
> > xeno-config --version
> > 2.5.5.2
> 
> Wow that is really really old.
> 
> > For more details, my application is a real-time controller which needs to
> > do image processing on a GPU. The image processing code executes at 500ms
> > on a CPU and 15ms on a GPU. The image frame rate is 30hz. The control loop
> > frequency is 500hz. The control loop is the only part which needs to be
> > hard RT.
> > 
> > If I can't install and run the NVIDIA driver at all on my system I will
> > look into a solution with a separate control and perception computer.
> 
> Since xenomai uses ipipe which changes the way IRQs are handled, the
> fact you don't have source code to recompile the nvidia driver means you
> can make the nvidia driver work correctly with ipipe, so if you have the
> nvidia driver running you really have no idea if you will get real time
> or not since the nvidia driver won't be following the rules.
> 
> At least that is how I have understood the situation.

Last time I looked, NVIDIA drivers used some glue code to adapt to
the particular kernel for which they were compiled. This glue made
use of the standard macro local_irq_save/spin_lock_irqsave, etc...
So, compiling the NVIDIA driver with an I-pipe kernel worked, and so
did running Xenomai programs along side graphic applications. But
that was a long time ago. In any case, running the latency test
while your image processing program is running on the GPU should
allow you to find whether the driver is generating large latencies.

-- 
					    Gilles.
https://click-hack.org


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

* Re: [Xenomai] NVIDIA Drivers w/ Xenomai
  2015-12-22  0:22 [Xenomai] NVIDIA Drivers w/ Xenomai Eric Huang
  2015-12-22  2:43 ` Lennart Sorensen
@ 2015-12-22  7:37 ` Gilles Chanteperdrix
  1 sibling, 0 replies; 7+ messages in thread
From: Gilles Chanteperdrix @ 2015-12-22  7:37 UTC (permalink / raw)
  To: Eric Huang; +Cc: xenomai

On Mon, Dec 21, 2015 at 07:22:26PM -0500, Eric Huang wrote:
> Hi,
> 
> The specific question I am trying to answer is whether it is possible (at
> all) to install an NVIDIA driver alongside Xenomai
> 
> My system is the following.
> 
> uname -a
> Linux robot-Z68X-UD3H-B3 3.2.21-xenomai-2.6.1 #1 SMP Thu Jul 26 11:46:23
> EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
> 
> xeno-config --version
> 2.5.5.2

By the way, you have a mismatch between Xenomai user-space and
kernel-space, xenomai 2.5.5.2 user-space should not work with a
xenomai 2.6.1 kernel space. You need a xenomai 2.6.x user-space for
a xenomai 2.6.1 kernel space. And Xenomai on Linux 3.2 is broken.
So, I would say a general upgrade is in order.

-- 
					    Gilles.
https://click-hack.org


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

* Re: [Xenomai] NVIDIA Drivers w/ Xenomai
  2015-12-22  7:30   ` Gilles Chanteperdrix
@ 2015-12-22 15:54     ` Lennart Sorensen
  2015-12-22 17:33       ` Jeff Webb
  0 siblings, 1 reply; 7+ messages in thread
From: Lennart Sorensen @ 2015-12-22 15:54 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai

On Tue, Dec 22, 2015 at 08:30:37AM +0100, Gilles Chanteperdrix wrote:
> Last time I looked, NVIDIA drivers used some glue code to adapt to
> the particular kernel for which they were compiled. This glue made
> use of the standard macro local_irq_save/spin_lock_irqsave, etc...
> So, compiling the NVIDIA driver with an I-pipe kernel worked, and so
> did running Xenomai programs along side graphic applications. But
> that was a long time ago. In any case, running the latency test
> while your image processing program is running on the GPU should
> allow you to find whether the driver is generating large latencies.

OK, maybe it isn't as bad as I was led to believe in the past then.

I suppose one could hope there are no interrupt disable calls in the
nvidia binary blob directly.

-- 
Len Sorensen


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

* Re: [Xenomai] NVIDIA Drivers w/ Xenomai
  2015-12-22 15:54     ` Lennart Sorensen
@ 2015-12-22 17:33       ` Jeff Webb
  2015-12-23 12:48         ` Gilles Chanteperdrix
  0 siblings, 1 reply; 7+ messages in thread
From: Jeff Webb @ 2015-12-22 17:33 UTC (permalink / raw)
  To: xenomai

On 12/22/2015 09:54 AM, Lennart Sorensen wrote:
> On Tue, Dec 22, 2015 at 08:30:37AM +0100, Gilles Chanteperdrix wrote:
>> Last time I looked, NVIDIA drivers used some glue code to adapt to
>> the particular kernel for which they were compiled. This glue made
>> use of the standard macro local_irq_save/spin_lock_irqsave, etc...
>> So, compiling the NVIDIA driver with an I-pipe kernel worked, and so
>> did running Xenomai programs along side graphic applications. But
>> that was a long time ago. In any case, running the latency test
>> while your image processing program is running on the GPU should
>> allow you to find whether the driver is generating large latencies.
>
> OK, maybe it isn't as bad as I was led to believe in the past then.
>
> I suppose one could hope there are no interrupt disable calls in the
> nvidia binary blob directly.

I have experienced some high worst-case latencies when using the NVIDIA drivers along side Xenomai real-time code in the past.  The open source drivers seemed to be more well-behaved from a real-time point of view.  You may be able to get the closed-source drivers to work for your application, depending on your timing constraints and GPU feature usage.  As Gilles mentioned, you really should try running the latency test while putting the system (and GPU) under load.  As I remember, switching to another virtual console sometimes triggered some nasty behavior.

-Jeff



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

* Re: [Xenomai] NVIDIA Drivers w/ Xenomai
  2015-12-22 17:33       ` Jeff Webb
@ 2015-12-23 12:48         ` Gilles Chanteperdrix
  0 siblings, 0 replies; 7+ messages in thread
From: Gilles Chanteperdrix @ 2015-12-23 12:48 UTC (permalink / raw)
  To: Jeff Webb; +Cc: xenomai

On Tue, Dec 22, 2015 at 11:33:57AM -0600, Jeff Webb wrote:
> On 12/22/2015 09:54 AM, Lennart Sorensen wrote:
> > On Tue, Dec 22, 2015 at 08:30:37AM +0100, Gilles Chanteperdrix wrote:
> >> Last time I looked, NVIDIA drivers used some glue code to adapt to
> >> the particular kernel for which they were compiled. This glue made
> >> use of the standard macro local_irq_save/spin_lock_irqsave, etc...
> >> So, compiling the NVIDIA driver with an I-pipe kernel worked, and so
> >> did running Xenomai programs along side graphic applications. But
> >> that was a long time ago. In any case, running the latency test
> >> while your image processing program is running on the GPU should
> >> allow you to find whether the driver is generating large latencies.
> >
> > OK, maybe it isn't as bad as I was led to believe in the past then.
> >
> > I suppose one could hope there are no interrupt disable calls in the
> > nvidia binary blob directly.
> 
> I have experienced some high worst-case latencies when using the
> NVIDIA drivers along side Xenomai real-time code in the past. The
> open source drivers seemed to be more well-behaved from a
> real-time point of view.

If you are talking about the "nouveau" drivers, unfortunately I am
afraid they will not satisfy the user needs: last time I tried
writing shaders for the nouveau drivers, the shaders were run on the
CPU, not the GPU.

-- 
					    Gilles.
https://click-hack.org


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

end of thread, other threads:[~2015-12-23 12:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-22  0:22 [Xenomai] NVIDIA Drivers w/ Xenomai Eric Huang
2015-12-22  2:43 ` Lennart Sorensen
2015-12-22  7:30   ` Gilles Chanteperdrix
2015-12-22 15:54     ` Lennart Sorensen
2015-12-22 17:33       ` Jeff Webb
2015-12-23 12:48         ` Gilles Chanteperdrix
2015-12-22  7:37 ` Gilles Chanteperdrix

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.