From patchwork Wed Nov 23 15:14:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Christoph Lameter (Ampere)" X-Patchwork-Id: 127323 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 36CF91007D4 for ; Thu, 24 Nov 2011 02:15:08 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756423Ab1KWPOo (ORCPT ); Wed, 23 Nov 2011 10:14:44 -0500 Received: from smtp109.prem.mail.ac4.yahoo.com ([76.13.13.92]:48551 "HELO smtp109.prem.mail.ac4.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1756275Ab1KWPOn (ORCPT ); Wed, 23 Nov 2011 10:14:43 -0500 Received: (qmail 76441 invoked from network); 23 Nov 2011 15:14:42 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1322061282; bh=bDhhd7uDEOhfb7zyGkufkhRw7mdhrIBFbbSvfs9UX+c=; h=X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:Received:Date:From:X-X-Sender:To:cc:Subject:In-Reply-To:Message-ID:References:User-Agent:MIME-Version:Content-Type; b=nvANNn9gfEAZInNgX+GYx/sB/WdN8MQVuokhWmizXipuaej1FlnniAMoCq2tkJF78jzyGYpCXN39pbY+lRTiVa2UeswGpRNSLVHCZpaF/RuWJrE5DnVUOSrrg9Rw9SlUnNGbDbYCqUD6JMsGmenzzXOHo+sGVNdPKJXCNHtjr4s= X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: wG4CSTwVM1kUhgkM2OmnrePbT8IJAxAaZXJrEGZTbzOQVMy 2RTJmLwkaZHFEJN2aJADlZOE2GGxUFxwRm079u5Oh9rJYfWI3JaWKkxS8cyP 6AL7r_MElpT4rDPLiR8j5B17vFL8ae6LPIIOrbYLKN56AiVdy1GJMsgpmf0K qwbjFLlDg8beaP7szbnyOfAn3Trk.FJlfJMe.dzk391le7R4oSPDNNiiq_C3 hA2xxfagSd43dIFJSLBhbv9B902gs5zONf1r6go9bkL5qgHst7b7ae_PXaG3 zc9jje2Hhz_a3rAkcnEDEaCEtTFqSehWJbDBnB35QVemhbB3X0iOpH7_ZqwI 8tp5jGgASvSlcNKEiGid6Q6.jPV0tlY.NtLLFZ22gQweA8g-- X-Yahoo-SMTP: _Dag8S.swBC1p4FJKLCXbs8NQzyse1SYSgnAbY0- Received: from router.home (cl@99.30.10.212 with plain) by smtp109.prem.mail.ac4.yahoo.com with SMTP; 23 Nov 2011 07:14:42 -0800 PST Received: from cl (helo=localhost) by router.home with local-esmtp (Exim 4.71) (envelope-from ) id 1RTEX3-0004GI-Hz; Wed, 23 Nov 2011 09:14:41 -0600 Date: Wed, 23 Nov 2011 09:14:38 -0600 (CST) From: Christoph Lameter X-X-Sender: cl@router.home To: Pekka Enberg cc: Christian Kujau , Benjamin Herrenschmidt , Eric Dumazet , Markus Trippelsdorf , "Alex,Shi" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , Matt Mackall , "netdev@vger.kernel.org" , Tejun Heo , David Rientjes Subject: slub: use irqsafe_cpu_cmpxchg for put_cpu_partial In-Reply-To: Message-ID: References: <20111121131531.GA1679@x4.trippels.de> <20111121153621.GA1678@x4.trippels.de> <1321890510.10470.11.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC> <20111121161036.GA1679@x4.trippels.de> <1321894353.10470.19.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC> <1321895706.10470.21.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC> <20111121173556.GA1673@x4.trippels.de> <1321900743.10470.31.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC> <20111121185215.GA1673@x4.trippels.de> <20111121195113.GA1678@x4.trippels.de> <1321907275.13860.12.camel@pasglop> <1321948113.27077.24.camel@edumazet-laptop> <1321999085.14573.2.camel@pasglop> <1322007501.14573.15.camel@pasglop> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Wed, 23 Nov 2011, Pekka Enberg wrote: > 2011/11/23 Christian Kujau : > > OK, with Christoph's patch applied, 3.2.0-rc2-00274-g6fe4c6d-dirty survives > > on this machine, with the disk & cpu workload that caused the machine to > > panic w/o the patch. Load was at 4-5 this time, which is expected for this > > box. I'll run a few more tests later on, but it seems ok for now. > > > > I couldn't resist and ran "slabinfo" anyway (after the workload!) - the > > box survived, nothing was printed in syslog either. Output attached. > > Christoph, Eric, would you mind sending me the final patches that > Christian tested? Maybe CC David too for extra pair of eyes. I think he only tested the patch that he showed us. Here is the patch cleaned up. Do you Want me to feed you the debug fixes patch by patch as well? Subject: slub: use irqsafe_cpu_cmpxchg for put_cpu_partial The cmpxchg must be irq safe. The fallback for this_cpu_cmpxchg only disables preemption which results in per cpu partial page operation potentially failing on non x86 platforms. Signed-off-by: Christoph Lameter Acked-by: Eric Dumazet Acked-by: David Rientjes --- mm/slub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-2.6/mm/slub.c =================================================================== --- linux-2.6.orig/mm/slub.c 2011-11-23 09:10:48.000000000 -0600 +++ linux-2.6/mm/slub.c 2011-11-23 09:10:57.000000000 -0600 @@ -1969,7 +1969,7 @@ int put_cpu_partial(struct kmem_cache *s page->pobjects = pobjects; page->next = oldpage; - } while (this_cpu_cmpxchg(s->cpu_slab->partial, oldpage, page) != oldpage); + } while (irqsafe_cpu_cmpxchg(s->cpu_slab->partial, oldpage, page) != oldpage); stat(s, CPU_PARTIAL_FREE); return pobjects; }