From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1DF18C43387 for ; Tue, 18 Dec 2018 07:44:21 +0000 (UTC) Received: from shelob.surriel.com (shelob.surriel.com [96.67.55.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C70A1217D8 for ; Tue, 18 Dec 2018 07:44:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="A5S4Uk0s" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C70A1217D8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=kernelnewbies-bounces@kernelnewbies.org Received: from localhost ([::1] helo=shelob.surriel.com) by shelob.surriel.com with esmtp (Exim 4.91) (envelope-from ) id 1gZA2l-0003k9-FR; Tue, 18 Dec 2018 02:43:55 -0500 Received: from mail-lj1-x22a.google.com ([2a00:1450:4864:20::22a]) by shelob.surriel.com with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1gZA2k-0003jy-8s for kernelnewbies@kernelnewbies.org; Tue, 18 Dec 2018 02:43:54 -0500 Received: by mail-lj1-x22a.google.com with SMTP id g11-v6so13335352ljk.3 for ; Mon, 17 Dec 2018 23:43:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ehq2NQSEiosuTl/GNlNZE5uxIjrMVkRBzmH06VuIezU=; b=A5S4Uk0sY7Yt48MArRiNbiRPo9fhKvTgPdyANBvIEfCx/XGqta1AdG5ghM/1nfNPMj tLaEVh4PAEJoX2KPQLf1gpRKwsEzcBr3/kyf6d62+pVlRoL27g8GsLXl78SDTlBzuSaY SDc5elPb7/DUV/laiV5Q5IzSd0Rmw7FrCx57FkpokCoXXgerM0F4JBCCxReLH7Q24h+4 OR3Amlx0uWm18RZrM1FSeLDLnMorKjpVfI9/3eBhiBEDXUpZCfxB18rRTFELLURZGc3G FViqUbRPPIgM44ytCRQ6eofq2aEQihCutSXWU8O13k9Lrt7qvqhq6cox0h2+JQDAEvgY K6UQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ehq2NQSEiosuTl/GNlNZE5uxIjrMVkRBzmH06VuIezU=; b=Vczm4j+CMkNibaY32CuwAUC4UtJkYXsitXwvPbVW90yPtipowKk9GRve9ujUi6cImP efMlK1XqigPuXjgh2cHVavSdzNCqThtmhs0FUphr80GLasZ2V6YF8SvjjfA1vDphE7Q8 slQl79g4+v8Z4EuKv/Ux4CTmBqSq2wU2cEngCmQ1Jx5MIL+vv6K9dq6C4A4TOhSEC4aL SIPntvc5ctQ/j+X4IB980u4XTAZywkA8RmoXe3w5o7BVF8rUgpr0ibDyTG0HpUsuWkt/ ciQzy+blWbsMnrEdFBXdkFqs+hAaS8HxFCBK6OORD4crlwq3M4WMyixcegrceK43N5hu 3Fyw== X-Gm-Message-State: AA+aEWb9uQ6IKkd1d41NFxYQXyfqMmP9+oCLRIyqVDXVjZRcugXn7I2H 3ZJVA03KLmFHe2jPpFBMSItBDMkRQH8X6RO1nic= X-Google-Smtp-Source: AFSGD/Xuf9kR26setcDm7Z3gJ8WdEbOfDBxqUo+bObr46f7Tgm1ALEAFobYCvyGUwiOwkvP0U/Rnc36FM3h275Uj++c= X-Received: by 2002:a2e:5d12:: with SMTP id r18-v6mr10619355ljb.89.1545119029986; Mon, 17 Dec 2018 23:43:49 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Mulyadi Santosa Date: Tue, 18 Dec 2018 14:42:13 +0700 Message-ID: Subject: Re: How to detect slab memory leak To: Naruto Nguyen Cc: kernelnewbies X-BeenThere: kernelnewbies@kernelnewbies.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Learn about the Linux kernel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============7351381368273999985==" Errors-To: kernelnewbies-bounces@kernelnewbies.org --===============7351381368273999985== Content-Type: multipart/alternative; boundary="000000000000eb0b8e057d470e78" --000000000000eb0b8e057d470e78 Content-Type: text/plain; charset="UTF-8" On Sun, Dec 16, 2018 at 1:25 PM Naruto Nguyen 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@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 --000000000000eb0b8e057d470e78 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Sun, Dec 16, 2018 at 1:25 PM Naruto Nguyen <narutonguyen2018@gmail.com> w= rote:
Hi everyon= e,

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
= =C2=A0
_______________________________________________
Kernelnewbies mailing list
Kernel= newbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailma= n/listinfo/kernelnewbies


--
regards,

Mulyadi Santosa
Freelance Linux trainer = and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
--000000000000eb0b8e057d470e78-- --===============7351381368273999985== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies --===============7351381368273999985==--