linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Maxin John <maxin.john@gmail.com>,
	Daniel Baluta <daniel.baluta@gmail.com>,
	naveen yadav <yad.naveen@gmail.com>,
	linux-mips@linux-mips.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org
Subject: Re: kmemleak for MIPS
Date: Wed, 30 Mar 2011 15:07:48 +0100	[thread overview]
Message-ID: <1301494068.29074.94.camel@e102109-lin.cambridge.arm.com> (raw)
In-Reply-To: <1301491622.3283.46.camel@edumazet-laptop>

On Wed, 2011-03-30 at 14:27 +0100, Eric Dumazet wrote:
> Le mercredi 30 mars 2011 à 14:17 +0100, Maxin John a écrit :
> > I have compiled the kernel with below given modification in .config
> >
> > CONFIG_CMDLINE="uhash_entries=256"
> >
> > After booting with the new kernel, the "kmemleak" no longer complains
> > about the "udp_table_init".
> > However it do report another possible leak :)
> >
> > debian-mips:~# cat /sys/kernel/debug/kmemleak
> > unreferenced object 0x8f085000 (size 4096):
> >   comm "swapper", pid 1, jiffies 4294937670 (age 1043.280s)
> >   hex dump (first 32 bytes):
> >     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> >     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
> >   backtrace:
> >     [<801ac7a8>] __kmalloc+0x130/0x180
> >     [<80532500>] flow_cache_cpu_prepare+0x50/0xa8
> >     [<8052378c>] flow_cache_init_global+0x90/0x138
> >     [<80100584>] do_one_initcall+0x174/0x1e0
> >     [<8050c348>] kernel_init+0xe4/0x174
> >     [<80103d4c>] kernel_thread_helper+0x10/0x18
> > debian-mips:~#
> 
> Hmm, then MIPS kmemleak port might have a problem with percpu data ?
> 
> fcp->hash_table = kzalloc_node(sz, GFP_KERNEL, cpu_to_node(cpu));
> 
> fcp is a per cpu "struct flow_cache_percpu"

I can't figure out what it is. Kmemleak uses this block for scanning the
percpu data:

	for_each_possible_cpu(i)
		scan_block(__per_cpu_start + per_cpu_offset(i),
			   __per_cpu_end + per_cpu_offset(i), NULL, 1);

The __per_cpu_* symbols seem to be correctly defined in the MIPS
vmlinux.lds.S as it uses the PERCPU macro directly.

Other chunks allocated via pcpu_mem_alloc() should be tracked by
kmemleak and either reported as leaks or scanned (and not reporting
subsequent blocks referred from the percpu memory).

-- 
Catalin


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2011-03-30 14:08 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-02 13:54 naveen yadav
2011-03-24  9:27 ` Daniel Baluta
2011-03-24  9:55   ` Catalin Marinas
2011-03-28 21:15     ` Maxin John
2011-03-29 10:40       ` Catalin Marinas
2011-03-29 11:38         ` Maxin John
2011-03-29 11:50           ` Catalin Marinas
2011-03-29 12:27             ` Maxin John
2011-03-29 19:36               ` Maxin John
2011-03-29 19:54                 ` Daniel Baluta
2011-03-30  9:15                 ` Catalin Marinas
2011-03-30  9:54                   ` Daniel Baluta
2011-03-30  9:58                     ` Catalin Marinas
2011-03-30 11:03                     ` Maxin John
2011-03-30 11:24                       ` Daniel Baluta
2011-03-30 11:38                         ` Catalin Marinas
2011-03-30 12:17                           ` Maxin John
2011-03-30 12:27                             ` Eric Dumazet
2011-03-30 12:40                               ` Maxin John
2011-03-30 12:52                               ` Daniel Baluta
2011-03-30 13:17                                 ` Maxin John
2011-03-30 13:27                                   ` Eric Dumazet
2011-03-30 14:07                                     ` Maxin John
2011-03-30 14:07                                     ` Catalin Marinas [this message]
2011-03-30 12:22                         ` Eric Dumazet
2011-03-30 10:08                   ` Maxin John
2011-03-30 14:28                 ` Ralf Baechle
2011-03-30 14:21         ` Ralf Baechle
  -- strict thread matches above, loose matches on Subject: below --
2009-11-02 17:07 Kmemleak for mips Luis R. Rodriguez
2009-11-03  9:23 ` Catalin Marinas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1301494068.29074.94.camel@e102109-lin.cambridge.arm.com \
    --to=catalin.marinas@arm.com \
    --cc=daniel.baluta@gmail.com \
    --cc=eric.dumazet@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-mm@kvack.org \
    --cc=maxin.john@gmail.com \
    --cc=yad.naveen@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox