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.

关于启动参数中vmalloc的配置问题



群内的朋友们好!

    我用的是ipnc rdk3.8, DDR是2G, 我的内存配置大致如下:

1)config.bld

/* 1st and 2nd 512MB(specific items) */
var LINUX_SIZE                   = 110*MB    
var SR1_SIZE                   = 135*MB;
var VIDEO_M3_CODE_SIZE         = 6*MB;
var VIDEO_M3_DATA_SIZE         = 24*MB;
var DSS_M3_CODE_SIZE           = 6*MB;
var DSS_M3_DATA_SIZE           = 24*MB;
var DSP_CODE_SIZE              = 1*MB;
var DSP_DATA_SIZE               = 206*MB
var TILER_SIZE                 = 10*MB; /* Reducing this to fix Vid Frame Alloc failures. Need to fix */ /* MUST be aligned on 128MB boundary */
var SR2_FRAME_BUFFER_SIZE      = 479*MB;  
var SR0_SIZE                   = 16*MB;
var HDVPSS_DESC_SIZE           = 2*MB;
var HDVPSS_SHARED_SIZE         = 2*MB;
var NOTIFY_SHARED_SIZE         = 2*MB;
var REMOTE_DEBUG_SIZE          = 1*MB;
/* 3rd and 4th 512MB(specific items) */
var LINUX_EXT_SIZE             = 512*MB;
var CMEM_SIZE                  = 512*MB;

2)而在FC_RMAN_IRES_c6xdsp.cfg中配置DSP用到的堆空间为:

heapMemParams.size            = 0x05000000;

3)启动参数bootargs中vmalloc = 896M

当我启动相机后,从串口中打印出错误日志如下:

vmap allocation for size 141561856 failed: use vmalloc=<size> to increase size.

从日志上看貌似是vmalloc分配小了,但kernel对vmalloc是有限制的.

群内的朋友哪位知道kernel启动时,什么内存会映射到vmalloc空间来呢? 比如上面我分配的2G空间中的各个部分,有哪些部分是在kernel启动时会关联到vmalloc中的呢? 目前因为应用需要,要在dsp端申请80M的堆空间,我能怎样减少其他对vmalloc的占用呢?

期待回复,先谢谢了!!!

  • Zhang Jensen,

    https://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/p/357908/1257706#1257706

    vmalloc size is determined mainly by syslink requirement. Syslink requires vmalloc memory when loading each M3 and c674 firmware. The size fo vmalloc area depends on size of .text + .data and this is typically small of the order of 10MB or so. The other major use of vmalloc in syslink is for the SharedRegion. SharedRegion physical memory is remapped and this consumes equal amount of vmalloc space.So size of vmalloc space is mainly determined by SharedRegion size. On A8 SR1 and SR0 are mapped. Insufficient vmalloc space will cause firmware load to fail.

    vmalloc space is just virtual memory . Setting it to 476 M doesn't mean linux_mem_size has to be greater than 476M.