Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp4129278pxa; Mon, 10 Aug 2020 01:09:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHqInaygzLsDTm9uobf8fUnWZ2SGFAe5nvLamrLjYheT9V7k7CLgVi1wBCZr5SFQl7ZIlk X-Received: by 2002:a17:906:7fc9:: with SMTP id r9mr19870320ejs.407.1597046998729; Mon, 10 Aug 2020 01:09:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597046998; cv=none; d=google.com; s=arc-20160816; b=TvmylGd1o99iOCOAMy6B2nXKcjfcsAN8OORmjszrGx1L1RPQtp0rUQCrDA06qHwO+9 Ch1u1xxkrbI3RfDDUh/mW+NLO2309Q+rAWAZceKVrhH97BNjCnpKgelO1Zwe1jlgRXHd Dkg/fNC7ABHC+87SRU5VXOhuXi/xt4EEnmuP2UtXRcKn4Ha9W1YbICpbMQ2OnxSDQ2jf 9VKCCD8Od6/I/hzbbX1VGuCnULj3jLPSPXarp2h6spyI6gyS1k7MJQMGCed8IVJJMIlu csG1aFbo4q6hHjKUqKSOQ4GUDlKn25b+XM7hFTRaDKieKa9RkVfHv9VapytivAwiWeGb Y4kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=7meXlCLNggF2C1WNCCdhpN9intbtioXb5UIQEX4gaTc=; b=xUdaysn5drjTMldNyVBBbnJcOqQGHlg3vf6Wy/+TY7BWgxHdN2Eb8yQdc7l8r5vKV+ p5TCGGf+CflC8ujVWSiU8xRpe7Vz/DVxI4+F4I3uCT96ptdYST6kWNF62t2t4rrAPZT9 GhPxYNuXiQnucZqpXRPRucp2+XYUca1tt+ML3S2+eyfWmdhJqvbI6uSAsAOWn/ph3zwy KsDFwlO0LlGEqHTzXzcjpB+GXQRvpB4mfgDBSzAsaDu/M6Rxt7QGlYUPbJjMXa9TggTq vmK+sCyhipE1mMq3ZI5eRKwaNxs1TBg8kEic0H//06AF6PwGKv01k4funxafw0v9RUhU 0mVQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gv12si9966582ejb.430.2020.08.10.01.09.36; Mon, 10 Aug 2020 01:09:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726457AbgHJIIi (ORCPT + 99 others); Mon, 10 Aug 2020 04:08:38 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:57074 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726284AbgHJIIh (ORCPT ); Mon, 10 Aug 2020 04:08:37 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 1001481EC8B43A87BDCD; Mon, 10 Aug 2020 16:08:36 +0800 (CST) Received: from DESKTOP-A9S207P.china.huawei.com (10.174.179.61) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.487.0; Mon, 10 Aug 2020 16:08:29 +0800 From: To: Christoph Lameter , Pekka Enberg , "David Rientjes" , Joonsoo Kim , "Andrew Morton" CC: , Abel Wu , "open list:SLAB ALLOCATOR" , open list Subject: [PATCH] mm/slub: remove useless kmem_cache_debug Date: Mon, 10 Aug 2020 16:07:55 +0800 Message-ID: <20200810080758.940-1-wuyun.wu@huawei.com> X-Mailer: git-send-email 2.28.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.174.179.61] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Abel Wu The commit below is incomplete, as it didn't handle the add_full() part. commit a4d3f8916c65 ("slub: remove useless kmem_cache_debug() before remove_full()") Signed-off-by: Abel Wu --- mm/slub.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mm/slub.c b/mm/slub.c index fe81773..0b021b7 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -2182,7 +2182,8 @@ static void deactivate_slab(struct kmem_cache *s, struct page *page, } } else { m = M_FULL; - if (kmem_cache_debug(s) && !lock) { +#ifdef CONFIG_SLUB_DEBUG + if (!lock) { lock = 1; /* * This also ensures that the scanning of full @@ -2191,6 +2192,7 @@ static void deactivate_slab(struct kmem_cache *s, struct page *page, */ spin_lock(&n->list_lock); } +#endif } if (l != m) { -- 1.8.3.1