Hi
Is it possible to get any usage statistics on DSP/LINK POOL memory (used by MSGQ).
Worst case allocation, allocate/free counters etc.?
Best wishes,
Mads
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi
Is it possible to get any usage statistics on DSP/LINK POOL memory (used by MSGQ).
Worst case allocation, allocate/free counters etc.?
Best wishes,
Mads
Mads,
For our reference, can you tell us what device you are using and also what version of Link you are using?
Dave
Hi David
Of course, my bad.
We are using the OMAP-L138.
DSP/Link version 1.65.00.03 (soon to be upgraded to 1.65.01.06, when we are moving to a newer Linux kernel)
Thanks,
Mads
Hi Mads,
Unfortunately there are no way to statistics via POOL. You could write your own POOL that maintains stats and simply calls into the real implementation (e.g. STATICPOOL on the DSP). This would be relatively straightforward. We call this a "stacking" POOL. For instance, the alloc would look like this
Int MYPOOL_open(Ptr *object, Ptr params)
{
status = _STATICPOOL_open(object->staticPoolObj, params);
clear statistics in object as needed;
}
Int MYPOOL_alloc(Ptr object, Ptr *buf, size_t size)
{
status = _STATICPOOL_alloc(object->staticPoolObj, buf, size);
update statistics in object as needed;
}
Then have a MYPOOL_getStats function.
Or, I can send you the source code to STATICPOOL and you could modify it as needed.The host side code is already present in DSPLink.
Todd
For DSPLink you are probably using the SMAPOOL (Shared Memory Alocator POOL). The sources for this POOL implementation for both the HOST and DSP are included in DSPLink release.
There is a design document provided in DSPLink for the POOL module, which describes the SMAPOOL implementation that you may be interested, if you decide to modify it to suit your needs. The document (LNK_082_DES.pdf) can be found in the dsplink\doc\design of you DSPLink installation.
Hi Todd (& Arnie)
Many thanks for your replies.
I was kind of fearing that no such thing was implemented and as Arnie guessed we are using the SMA pool (via MSGQ also).
I believe this might be a bit cumbersome for us. On the ARM side we have 3 processes (not threads) that uses the same pool & then of course the DSP side as well.
As I understand your proposal (Todd) I would have to write my own wrapper for the POOL_<name> functions, but then we would not collect statistics for the MSGQ and this statistics would only be on the current running process?
Thanks,
Mads
It's probably easier to just add the stats into the SMA pool implementation.
Todd
I just had a quick look at the sma_pool.c/h file.
For each pool there is a freeBuffers counter which I guess I could monitor. Will let you know if this works.
Thanks,
Mads