I use TX2, the bsp version is R32.3.1, I found memory leak when I modify spi clock rate. I use spidev test the test code like below. After test the Slab memory increase 2.5MB. I think there is something wrong with clock-tree subsystem. Please help me fix this issue, thanks.
I don’t think there’s problem for it.
When I add sleep 10 after the for loop before the cat /proc/meminfo | grep Slab
before test
Slab: 142668 kB
while count: 0
while count: 100
while count: 200
while count: 300
while count: 400
while count: 500
while count: 600
while count: 700
while count: 800
while count: 900
after test
Slab: 143020 kB
before test
Slab: 144968 kB
while count: 0
Slab: 144968 kB
while count: 10000
Slab: 147576 kB
while count: 20000
Slab: 150160 kB
while count: 30000
Slab: 153136 kB
while count: 40000
Slab: 155832 kB
Have some delay before to cat the Slab will show there is no Slab grew up.
before test
Slab: 143220 kB
while count: 0
Slab: 143220 kB
while count: 100
Slab: 143340 kB
while count: 200
Slab: 143200 kB
while count: 300
Slab: 143272 kB
while count: 400
Slab: 143284 kB
while count: 500
Slab: 143344 kB
while count: 600
Slab: 143432 kB
while count: 700
Slab: 143488 kB
while count: 800
Slab: 143432 kB
while count: 900
Slab: 143472 kB
after test
Slab: 143560 kB
Thanks for the info. However the SPI controller driver only allocate DMA buffer instead of kmalloc
Could you check if can reference to below like to get more informaiton.