From: KOSAKI Motohiro Subject: Re: 2.6.39-rc4+: Kernel leaking memory during FS scanning, regression? Date: Mon, 25 Apr 2011 11:42:25 +0900 (JST) Message-ID: <20110425114429.266A.A69D9226@jp.fujitsu.com> References: <20110424202158.45578f31@neptune.home> <20110424235928.71af51e0@neptune.home> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kosaki.motohiro@jp.fujitsu.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org To: Bruno =?UTF-8?B?UHLDqW1vbnQ=?= Return-path: In-Reply-To: <20110424235928.71af51e0@neptune.home> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org > On Sun, 24 April 2011 Bruno Pr=C3=A9mont = wrote: > > On an older system I've been running Gentoo's revdep-rebuild to che= ck > > for system linking/*.la consistency and after doing most of the wor= k the > > system starved more or less, just complaining about stuck tasks now= and > > then. > > Memory usage graph as seen from userspace showed sudden quick incre= ase of > > memory usage though only a very few MB were swapped out (c.f. attac= hed RRD > > graph). >=20 > Seems I've hit it once again (though detected before system was fully > stalled by trying to reclaim memory without success). >=20 > This time it was during simple compiling... > Gathered info below: >=20 > /proc/meminfo: > MemTotal: 480660 kB > MemFree: 64948 kB > Buffers: 10304 kB > Cached: 6924 kB > SwapCached: 4220 kB > Active: 11100 kB > Inactive: 15732 kB > Active(anon): 4732 kB > Inactive(anon): 4876 kB > Active(file): 6368 kB > Inactive(file): 10856 kB > Unevictable: 32 kB > Mlocked: 32 kB > SwapTotal: 524284 kB > SwapFree: 456432 kB > Dirty: 80 kB > Writeback: 0 kB > AnonPages: 6268 kB > Mapped: 2604 kB > Shmem: 4 kB > Slab: 250632 kB > SReclaimable: 51144 kB > SUnreclaim: 199488 kB <--- look big as well... > KernelStack: 131032 kB <--- what??? KernelStack is used 8K bytes per thread. then, your system should have 16000 threads. but your ps only showed about 80 processes. Hmm... stack leak? > PageTables: 920 kB > NFS_Unstable: 0 kB > Bounce: 0 kB > WritebackTmp: 0 kB > CommitLimit: 764612 kB > Committed_AS: 132632 kB > VmallocTotal: 548548 kB > VmallocUsed: 18500 kB > VmallocChunk: 525952 kB > AnonHugePages: 0 kB > DirectMap4k: 32704 kB > DirectMap4M: 458752 kB >=20