From patchwork Mon Apr 11 02:02:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joonsoo Kim X-Patchwork-Id: 8795881 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1078C9F3D1 for ; Mon, 11 Apr 2016 02:09:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3F2AA20256 for ; Mon, 11 Apr 2016 02:09:31 +0000 (UTC) Received: from bombadil.infradead.org (unknown [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1AF1420254 for ; Mon, 11 Apr 2016 02:09:30 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1apR8j-0007Fk-GR; Mon, 11 Apr 2016 01:59:45 +0000 Received: from lgeamrelo13.lge.com ([156.147.23.53]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1apR8g-00079w-7V for linux-arm-kernel@lists.infradead.org; Mon, 11 Apr 2016 01:59:43 +0000 Received: from unknown (HELO lgemrelse6q.lge.com) (156.147.1.121) by 156.147.23.53 with ESMTP; 11 Apr 2016 10:59:20 +0900 X-Original-SENDERIP: 156.147.1.121 X-Original-MAILFROM: iamjoonsoo.kim@lge.com Received: from unknown (HELO localhost) (10.177.222.138) by 156.147.1.121 with ESMTP; 11 Apr 2016 10:59:19 +0900 X-Original-SENDERIP: 10.177.222.138 X-Original-MAILFROM: iamjoonsoo.kim@lge.com Date: Mon, 11 Apr 2016 11:02:03 +0900 From: Joonsoo Kim To: Nishanth Menon Subject: Re: next-20160401+: ARM: DRA7: linux-next regression: mm/slab: clean-up kmem_cache_node setup Message-ID: <20160411020203.GA25211@js1304-P5Q-DELUXE> References: <570816F8.9070301@ti.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <570816F8.9070301@ti.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160410_185942_697939_0031FA04 X-CRM114-Status: GOOD ( 17.01 ) X-Spam-Score: -2.9 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Russell King , Tony Lindgren , lkml , linux-next , Andrew Morton , linux-omap , "linux-arm-kernel@lists.infradead.org" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RDNS_NONE,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Fri, Apr 08, 2016 at 03:39:20PM -0500, Nishanth Menon wrote: > Hi, > > http://marc.info/?l=linux-omap&m=146014314115625&w=2 series works with > v4.6-rc2 kernel, however, it fails with linux-next for suspend-to-ram > (mem) on BeagleBoard-X15 > > next-20160327 - good > next-20160329 - good > next-20160330 - Fails to boot - I2C crashes > next-20160331- Fails to boot - USB crashes > next-20160401 -> bad > next-20160408 -> bad > > Bisect log of next-20160408 vs v4.6-rc2 -> > http://pastebin.ubuntu.com/15697856/ > > # first bad commit: [2b629704a2b6a5b239f23750e5517a9d8c3a4e8c] > mm/slab: clean-up kmem_cache_node setup > Hello, I made a mistake on that patch. Could you try to test below one on top of it. Thanks. --------->8---------------- From d3af3cc409527e9be6beb62ea395cde67f3c5029 Mon Sep 17 00:00:00 2001 From: Joonsoo Kim Date: Mon, 11 Apr 2016 10:48:29 +0900 Subject: [PATCH] mm/slab: clean-up kmem_cache_node setup-fix After calling free_block(), we need to re-calculate array_cache's avail counter. Fix it. And, it's better to free objects in shared array when it is really necessary. Check it before calling free_block(). Signed-off-by: Joonsoo Kim Tested-by: Jon Hunter Tested-by: Nishanth Menon --- mm/slab.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/slab.c b/mm/slab.c index fcd5fbb..27cb390 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -927,9 +927,10 @@ static int setup_kmem_cache_node(struct kmem_cache *cachep, n = get_node(cachep, node); spin_lock_irq(&n->list_lock); - if (n->shared) { + if (n->shared && force_change) { free_block(cachep, n->shared->entry, n->shared->avail, node, &list); + n->shared->avail = 0; } if (!n->shared || force_change) {