From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S266908AbUBMKqp (ORCPT ); Fri, 13 Feb 2004 05:46:45 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S266911AbUBMKqp (ORCPT ); Fri, 13 Feb 2004 05:46:45 -0500 Received: from thebsh.namesys.com ([212.16.7.65]:59520 "HELO thebsh.namesys.com") by vger.kernel.org with SMTP id S266908AbUBMKqn (ORCPT ); Fri, 13 Feb 2004 05:46:43 -0500 From: Nikita Danilov MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16428.43792.582229.53954@laputa.namesys.com> Date: Fri, 13 Feb 2004 13:46:40 +0300 To: Andrew Morton Cc: lepton , linux-kernel@vger.kernel.org Subject: Re: [BUG]kmalloc memory in reiserfs code failed on a dual amd64/4G linux 2.6.2 box In-Reply-To: <20040212223139.61c3c349.akpm@osdl.org> References: <20040213031653.GA25623@lepton.goldenhope.com.cn> <20040212223139.61c3c349.akpm@osdl.org> X-Mailer: VM 7.17 under 21.5 (beta16) "celeriac" XEmacs Lucid Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Andrew Morton writes: > lepton wrote: > > > > I seen such dmesg in mu dual amd64/4G memory box. > > > > I am running kernel 2.6.2 > > > > This is the second time I saw some problems about __alloc_pages on this > > amd 64 box... > > > > > > sort: page allocation failure. order:1, mode:0x20 > > > > Call Trace:{__alloc_pages+816} {__get_free_pages+78} > > {cache_grow+177} {cache_alloc_refill+440} > > {__kmalloc+102} {get_mem_for_virtual_node+102} > > {fix_nodes+232} {reiserfs_insert_item+149} > > {reiserfs_new_inode+892} {pathrelse+40} > > {reiserfs_create+171} {vfs_create+140} > > {open_namei+424} {filp_open+39} > > {sys32_open+56} {ia32_do_syscall+30} > > Nikita, why cannot get_mem_for_virtual_node() use GFP_KERNEL? Some stage in reiserfs balancing (fix_nodes() function) has to be performed without ever scheduling. If it schedules, it has to be restarted. As we don't want to restart often, we first try to do atomic allocation, and if it fails, GFP_NOFS allocation is done, and fix_nodes() restarted. All we need is to suppress warning. Nikita. ---------------------------------------------------------------------- ===== fs/reiserfs/fix_node.c 1.30 vs edited ===== --- 1.30/fs/reiserfs/fix_node.c Tue Jul 15 21:01:30 2003 +++ edited/fs/reiserfs/fix_node.c Fri Feb 13 13:39:25 2004 @@ -2037,7 +2037,7 @@ tb->vn_buf_size = size; /* get memory for virtual item */ - buf = reiserfs_kmalloc(size, GFP_ATOMIC, tb->tb_sb); + buf = reiserfs_kmalloc(size, GFP_ATOMIC | __GFP_NOWARN, tb->tb_sb); if ( ! buf ) { /* getting memory with GFP_KERNEL priority may involve balancing now (due to indirect_to_direct conversion on ----------------------------------------------------------------------