Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761530AbXEaS5f (ORCPT ); Thu, 31 May 2007 14:57:35 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1760613AbXEaS5Z (ORCPT ); Thu, 31 May 2007 14:57:25 -0400 Received: from netops-testserver-4-out.sgi.com ([192.48.171.29]:47337 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1757212AbXEaS5Z (ORCPT ); Thu, 31 May 2007 14:57:25 -0400 Date: Thu, 31 May 2007 11:57:23 -0700 (PDT) From: Christoph Lameter X-X-Sender: clameter@schroedinger.engr.sgi.com To: Andrew Morton cc: Michal Piotrowski , linux-kernel@vger.kernel.org, "Rafael J. Wysocki" , Satoru Takeuchi Subject: Re: 2.6.22-rc3-mm1 In-Reply-To: <20070531115319.967f9ff7.akpm@linux-foundation.org> Message-ID: References: <20070530235823.793f00d9.akpm@linux-foundation.org> <465F0B83.2050100@googlemail.com> <20070531113155.1c6d7185.akpm@linux-foundation.org> <20070531115319.967f9ff7.akpm@linux-foundation.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1525 Lines: 55 On Thu, 31 May 2007, Andrew Morton wrote: > we're not disbling local irqs on the cpu hotplug path. > > Could do local_irq_disable() in slab_cpuup_callback(), I guess. Ahh I see. SLUB: Fix locking for hotplug callbacks. Hotplug callbacks seem to be performed with interrupts enabled. Slub requires interrupts to be disabled for flushing caches. Signed-off-by: Christoph Lameter Index: slub/mm/slub.c =================================================================== --- slub.orig/mm/slub.c 2007-05-31 11:49:48.000000000 -0700 +++ slub/mm/slub.c 2007-05-31 11:54:09.000000000 -0700 @@ -2663,6 +2663,19 @@ static void for_all_slabs(void (*func)(s } /* + * Version of __flush_cpu_slab for the case that interrupts + * are enabled. + */ +static void cpu_slab_flush(struct kmem_cache *s, int cpu) +{ + unsigned long flags; + + local_irq_save(flags); + __flush_cpu_slab(s, cpu); + local_irq_restore(flags); +} + +/* * Use the cpu notifier to insure that the cpu slabs are flushed when * necessary. */ @@ -2676,7 +2689,7 @@ static int __cpuinit slab_cpuup_callback case CPU_UP_CANCELED_FROZEN: case CPU_DEAD: case CPU_DEAD_FROZEN: - for_all_slabs(__flush_cpu_slab, cpu); + for_all_slabs(cpu_slab_flush, cpu); break; default: break; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/