Received: with ECARTIS (v1.0.0; list linux-xfs); Mon, 08 Dec 2003 18:51:58 -0800 (PST) Received: from rj.sgi.com (mtvcafw.sgi.com [192.48.171.6]) by oss.sgi.com (8.12.10/8.12.9) with SMTP id hB92pbTa004581 for ; Mon, 8 Dec 2003 18:51:38 -0800 Received: from larry.melbourne.sgi.com (larry.melbourne.sgi.com [134.14.52.130]) by rj.sgi.com (8.12.9/8.12.9/linux-outbound_gateway-1.1) with SMTP id hB90wpOO027082 for ; Mon, 8 Dec 2003 16:58:51 -0800 Received: from wobbly.melbourne.sgi.com (wobbly.melbourne.sgi.com [134.14.55.135]) by larry.melbourne.sgi.com (950413.SGI.8.6.12/950213.SGI.AUTOCF) via ESMTP id NAA10490; Tue, 9 Dec 2003 13:51:26 +1100 Received: from frodo.melbourne.sgi.com (root@frodo.melbourne.sgi.com [134.14.55.153]) by wobbly.melbourne.sgi.com (SGI-8.12.5/8.12.5) with ESMTP id hB92pKUc2218107; Tue, 9 Dec 2003 13:51:21 +1100 (EST) Received: from frodo.melbourne.sgi.com (nathans@localhost [127.0.0.1]) by frodo.melbourne.sgi.com (8.12.9/8.12.9/Debian-3) with ESMTP id hB92orku001993; Tue, 9 Dec 2003 13:50:55 +1100 Received: (from nathans@localhost) by frodo.melbourne.sgi.com (8.12.9/8.12.9/Debian-3) id hB92odf3001991; Tue, 9 Dec 2003 13:50:39 +1100 Date: Tue, 9 Dec 2003 13:50:39 +1100 From: Nathan Scott To: marat Cc: linux-xfs@oss.sgi.com Subject: Re: kernel panic:kmem_zone_zalloc: NULL memory on KM_SLEEP request! Message-ID: <20031209025039.GB1798@frodo> References: <200312081317.26603.nospam-259928-001@slb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200312081317.26603.nospam-259928-001@slb.com> User-Agent: Mutt/1.5.3i X-archive-position: 1296 X-ecartis-version: Ecartis v1.0.0 Sender: linux-xfs-bounce@oss.sgi.com Errors-to: linux-xfs-bounce@oss.sgi.com X-original-sender: nathans@sgi.com Precedence: bulk X-list: linux-xfs Content-Length: 1191 Lines: 33 On Mon, Dec 08, 2003 at 01:17:26PM +0100, marat wrote: > Experts, > > Recently, I had one of the xfs filesystem failed and the only message was : > kernel panic:kmem_zone_zalloc: NULL memory on KM_SLEEP request! > > I had to reboot machine and run xfs_repair to make files system available again. > > I am using kernel 2.4.20 SMP and xfs version 1.3.0. > > Any ideas, suggestions how I can avoid this problem to happen again ? > Well, whats happened here is XFS is allocating memory from a context where it cannot fail, and retries the allocation a number of times (6 IIRC, with delays in-between each) and after freeing up everything that XFS can itself. Afterward if we still cannot get any memory allocated we give up and call BUG(). I guess we could keep retrying indefinitely, but that doesn't seem like a particularly good solution. I suspect we should be getting a bit more help from the VM here (more recent 2.4 kernels might make this case better) ... you may be able to tweak some variables in mm/vmscan.c too - these are likely sysctls somewhere - vm_mapped_ratio, vm_vfs_scan_ratio, etc (ah, have a look through "vm_table" in kernel/sysctl.c). cheers. -- Nathan