i want to use v4l2 to capture frames efficiently.
i am worried about swapping scenario (where operating system swaps pages from memory to disk).
the question is
a. will mmap do swap ?
in mmpap the driver allocates the memeory. so the memory is in kernel space.
does that mean it is not swapped ?
b. will dmabufs do swap ?
again, memory allocated by driver …
does that mean it is not swapped.
c. assuming i use userptr mode with pointers to shared memory allocated by my app.
i am not sure …
are shared memory blocks swapped to disk ?
may I know what’s your real use-case,
it’s memory management, we don’t see bugs in normal capture use-case.
I am writing app that consumes big images from driver using v4l2.
currently, i am using userptr mode that points to shared memeory blocks.
this way, the blocks are allocated by the app and not by the driver.
i am worried that while capturing frames, operating system might choose to swap blocks from shared memeory to disk,
my convern is not a bug in memory managment.
my concern is that in this scenario, operating system might want to swap some shared memeory block to disk.
when v4l2 will attemt to write to that block, it might take time to bring that block from disk to memory.
so… i am worried that my app will get slower, in unpredicted points of time, leaving me no simple way to monitor it.
the question is , is this possible scenario ?
how big is the capture frames? may I also know the image resolution?
you may refer to below for testing DMA transfer bandwidth,
for example, $public_source/kernel_src/kernel/kernel-5.10/drivers/dma/dmatest.c
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.