Part Number: TDA2
Tool/software: Linux
Hello, I'm using Processor SDK 3.03, building for custom board with TDA2 chip.
The usecase that we have fills 4 input buffers in NullSrc link from a file on SD card and forwards them to a link that we are using to write those buffers to an SSD. We have successfully written to 4 files opened without O_DIRECT flag using write() API. However, the CPU load is very high which is resulting in frame drops and we attributed that to heavy file system caching we suspect is being done in the background.
The next thing we did was try to open files with O_DIRECT flag on but there was nothing written to the files and the "dstat" shows no disk activity. We looked into it and found out that the write() is not being done at all, returning -1 instead. The errno error was "Bad address". We know that O_DIRECT usage requires proper buffer alignment but we made sure that they are aligned in several ways (printing the address to console as well as using this nifty trick here: http://www.titov.net/2006/01/02/using-o_largefile-or-o_direct-on-linux ) but to no avail, it keeps returning -1.
I just stumbled upon this post: https://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/t/242361#pi320098=3. It has something to do with the SR buffers being allocated in CMEM pool that the kernel cannot see or something like that. Is there any way to overlap a CMEM pool and the memory that kernel can see? Or is there something else entirely?
Thank you in advance.
Regards,
Nick