How to detect slab memory leak

Harsh Jain harshjain.prof at gmail.com
Tue Dec 18 03:31:42 EST 2018


You can try kernel config option "CONFIG_DEBUG_KMEMLEAK".


https://www.kernel.org/doc/html/v4.10/dev-tools/kmemleak.html

On Tue, Dec 18, 2018 at 1:14 PM Mulyadi Santosa
<mulyadi.santosa at gmail.com> wrote:
>
>
>
> On Sun, Dec 16, 2018 at 1:25 PM Naruto Nguyen <narutonguyen2018 at gmail.com> wrote:
>>
>> Hi everyone,
>>
>> When using slabtop to display the cache size growing, I see that
>> kmalloc-1024 and kmalloc-256 are increasing about 200MB after 1 hour.
>> Is there any way to detect which kernel components cause this slab
>> increase?
>>
>> Thanks a lot,
>> Brs,
>> Naruto
>>
>
> Hello Naruto
>
> I think you can do it by instrumenting call to kmalloc(). These days, eBPF is the hot stuff to try for this matter. See if it fits yours too.
>
> regards,
>
> Mulyadi
>
>>
>> _______________________________________________
>> Kernelnewbies mailing list
>> Kernelnewbies at kernelnewbies.org
>> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
>
> --
> regards,
>
> Mulyadi Santosa
> Freelance Linux trainer and consultant
>
> blog: the-hydra.blogspot.com
> training: mulyaditraining.blogspot.com
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



More information about the Kernelnewbies mailing list