This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Cap the GPU memory usage for mali kernel driver

Does the current r19 mali driver support capping the memory usage ?

I am looking at some of the memory stats for the mali driver and I see that the memory can grow till system runs out of memory: 

cat gpu_memory                                                                                     

mali0                  30117

  kctx-0xe4bff000      29066        1876

  kctx-0xe5b97000        144        1208

  kctx-0xe9fba000        629         797

  kctx-0xe3b92000        278         295

This is especially bad since this memory is not accounted as process memory. 

Regards,

Rob

Parents
  • It is linux (android), there are 2 sides of this: first the kernel driver allocated memory using a combination of gralloc/ion and second the process memory map from the dynamic lib. I am interested in the kernel memory usage, I can give you an example, candy crush uses about about 150MB worth of pages mapped to the process and another 120MB by the mali kernel driver. There are hacks to show the memory clubbed together (like dumpsys meminfo) but the linux kernel doesn't see those as together and can not reclaim or swap that mem. I am interested in anything that can reduce the memory consumption, even at the price of UX. 

Reply
  • It is linux (android), there are 2 sides of this: first the kernel driver allocated memory using a combination of gralloc/ion and second the process memory map from the dynamic lib. I am interested in the kernel memory usage, I can give you an example, candy crush uses about about 150MB worth of pages mapped to the process and another 120MB by the mali kernel driver. There are hacks to show the memory clubbed together (like dumpsys meminfo) but the linux kernel doesn't see those as together and can not reclaim or swap that mem. I am interested in anything that can reduce the memory consumption, even at the price of UX. 

Children
No data