Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Can DAQmx driver work with >4GB memory on Redhat linux?

I have a RedHat system running 4 dual core processors and 16GB of memory in a large simulation environment and would like to use the NI PCI-6221 M Series DAQ to provide a high resolution wakeup to my simulation. I keep getting the message that NIKAL will not load because of too much memory. On other devices, I have modified the driver to use the pci_alloc_consistent call to ensure low addressed DMA memory, but the NI driver just check the gross memory amount. How can I get the driver to work in my environment?
Message 1 of 3
(2,835 Views)
Well, it seems you are aware that one of the challenges is ensuring that DMA buffers are allocated from below 4 GB.  One of the problems is that we do not use the Linux DMA APIs so from an NI-KAL point of view we have no idea if a memory allocation will be used for DMA.

If you are the brave adventureous type (if not please don't try this) you could modify all of the memory allocation functions in nikal.c to turn around and call nNIKAL100_malloc32BitPhysicalContiguous(), and remove the check for more than 4 GB of physical address space.  Cross your fingers and hope that you don't run out of contiguous memory, or cause any other crazy problems.

Really as a company we will likely officially support 64-bit Linux before we support 32-bit systems with PAE.  I also suspect that NI-DAQmx Base will provide support for 64-bit Linux before NI-DAQmx.  If NI-DAQmx Base supported 64-bit Linux (likely with a 32-bit user-mode applicaiton) would that work for your use case?

Shawn Bohrer
National Instruments
Use NI products on Linux? Come join the NI Linux Users Community
Message 2 of 3
(2,823 Views)

Unfortunately, probably not. We are stuck with the 2.6.9 kernel because of another device in the system that does not support the 2.6.18 version. Otherwise, I would just load the high resolution timer package (true nanosecond timers) and be done. This was/is an attempt to get a highly reliable wake-up in a system with only microsecond timers available.

I see what you are talking about with the memory allocation routines. If I try it and it seems to work, I will contact NI to make it available.

0 Kudos
Message 3 of 3
(2,811 Views)