From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932157AbXA1AMk (ORCPT ); Sat, 27 Jan 2007 19:12:40 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932160AbXA1AMk (ORCPT ); Sat, 27 Jan 2007 19:12:40 -0500 Received: from smtp.osdl.org ([65.172.181.24]:39474 "EHLO smtp.osdl.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932157AbXA1AMj (ORCPT ); Sat, 27 Jan 2007 19:12:39 -0500 Date: Sat, 27 Jan 2007 16:12:29 -0800 From: Andrew Morton To: Pekka J Enberg Cc: linux-kernel@vger.kernel.org, hugh@veritas.com, clameter@sgi.com Subject: Re: [PATCH] slab: cache_grow cleanup Message-Id: <20070127161229.11637b80.akpm@osdl.org> In-Reply-To: References: X-Mailer: Sylpheed version 2.2.7 (GTK+ 2.8.17; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 9 Jan 2007 15:40:03 +0200 (EET) Pekka J Enberg wrote: > The current implementation of cache_grow() has to either (1) use pre-allocated > memory for the slab or (2) allocate the memory itself which makes the error > paths messy. Move __GFP_NO_GROW and __GFP_WAIT processing to kmem_getpages() > and introduce a new __cache_grow() variant that expects the memory for a new > slab to always be handed over in the 'objp' parameter. This gets its local interrupt state mucked up. BUG: sleeping function called from invalid context at mm/slab.c:3038 in_atomic():0, irqs_disabled():1 no locks held by init/1. irq event stamp: 656902 hardirqs last enabled at (656901): [] mod_zone_page_state+0x4b/0x50 hardirqs last disabled at (656902): [] cache_alloc_refill+0x384/0x6a0 softirqs last enabled at (650628): [] unix_release_sock+0x67/0x220 softirqs last disabled at (650626): [] _write_lock_bh+0xe/0x40 [] show_trace_log_lvl+0x1a/0x30 [] show_trace+0x12/0x20 [] dump_stack+0x16/0x20 [] __might_sleep+0xba/0xd0 [] kmem_cache_alloc+0xaf/0xd0 [] cache_alloc_refill+0x561/0x6a0 [] kmem_cache_zalloc+0xe4/0xf0 [] copy_process+0x89/0x1280 [] do_fork+0x6b/0x1c0 [] sys_clone+0x33/0x40 [] sysenter_past_esp+0x5d/0x99 =======================