Re: Memory leak in 2.6.11-rc1?

From: Andrew Morton
Date: Sun Jan 23 2005 - 05:43:22 EST


Jens Axboe <axboe@xxxxxxx> wrote:
>
> But I'm still stuck with all of my ram gone after a
> 600MB fillmem, half of it is just in swap.

Well. Half of it has gone so far ;)

>
> Attaching meminfo and sysrq-m after fillmem.

(I meant a really big fillmem: a couple of 2GB ones. Not to worry.)

It's not in slab and the pagecache and anonymous memory stuff seems to be
working OK. So it has to be something else, which does a bare
__alloc_pages(). Low-level block stuff, networking, arch code, perhaps.

I don't think I've ever really seen code to diagnose this.

A simplistic approach would be to add eight or so ulongs into struct page,
populate them with builtin_return_address(0...7) at allocation time, then
modify sysrq-m to walk mem_map[] printing it all out for pages which have
page_count() > 0. That'd find the culprit.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/