What is the nvmap-bz

I find nvmap-bz waste the CPU performance. I don’t know why? What is the nvmap-bz doing?

Hi,
It is mechanism of memory management on Jetson platforms. If there is heavy usage/access of host(CPU) and device(GPU and other hardware engines) memories, may see the driver being up and running frequently. It should be normal but if you suspect there might be something wrong in our driver, please share a way to show the phenomenon. We can check if it’s expected in the condition.

I use nvbuffercreate and nvbufferdestroy and NvBufferTransform and NvBuffer2Raw frequently. Will it increase?
And irq/51-host_sta waste the CPU performance too.

Hi,
The NvBuffer2Raw() function copies data from NvBuffer to CPU buffer and it takes CPU usage. You may check if it is good to call NvBufferMemMap() to get CPU pointer to the NvBuffer. This can access the data directly instead of copying to another CPU buffer.

I know.
But I want to scale a frame and copy it to the pointer to the address (char*), But the frame is nvbuffer fd. How to copy it?
That means Big picture → small picture-> a point address(char*), can I do it Big picture → a point address(char* small_picture)
I want to know if I can scale a picture from fd to (char*) and (char*) to fd?

Hi,
You can do scaling through NvBufferTransform(). Create destination NvBuffer in small resolution and the source NvBuffer will be scaled down to the resolution.

I know.
But I need to carry the small resolution picture to the (char*).
That means if do scaling, I can’t copy from fd->(char*). I must use NvBufferTransform and then NvBuffer2Raw to copy the data to the pointer (char*)? Right?

Hi,
Your understanding is correct. If you need data to be in a separate CPU buffer with (char *), you need to call NvBuffer2Raw().

Further optimization is to access/process the NvBuffer directly. There is demonstration in 10_camera_recording. Please check this option:

  -c        Enable demonstration of CPU processing
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.