From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-23.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 057DDC636CB for ; Mon, 19 Jul 2021 06:21:46 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8807161003 for ; Mon, 19 Jul 2021 06:21:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8807161003 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E49E68D0105; Mon, 19 Jul 2021 02:21:45 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E21558D0100; Mon, 19 Jul 2021 02:21:45 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CC2F38D0105; Mon, 19 Jul 2021 02:21:45 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id AB5938D0100 for ; Mon, 19 Jul 2021 02:21:45 -0400 (EDT) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 4EEA9231CD for ; Mon, 19 Jul 2021 06:21:44 +0000 (UTC) X-FDA: 78378341328.16.39614B0 Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) by imf16.hostedemail.com (Postfix) with ESMTP id 06BA1F000095 for ; Mon, 19 Jul 2021 06:21:43 +0000 (UTC) Received: by mail-pj1-f48.google.com with SMTP id me13-20020a17090b17cdb0290173bac8b9c9so13459247pjb.3 for ; Sun, 18 Jul 2021 23:21:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :mime-version; bh=Q9X6x+e06UI3F0nFfey9N+d4GzFycyXwhSyw0wNHAoM=; b=RVVEon+ao3twNDIZID/4EIi2113ly0TlofiQD8z11HgiL33AHoxhj9n85p9IK6CkYk 7RAbm0JKFQM6bMbwExvB5nod62KcbZ9xsZb3i2sHB1VqQl+9rr2PjMnOV4Sn4V64zJ/V x9CaPtdFVnireEebgNFnSx4qAQPZXB/NMKmu7c5m5KarYQ7XFOG0OAR2YNyLUizlziWI iE3SzUYslbhG3HeGXZu/i22zGUMh2/O7bjcCf0pPJVLGj2PuuXjIlBvW82PW3BQVpgAr IcFC9/21h5Ef425HK9+uTYHk4B71aeu/oSna3WhNtRo4KFPI8jvOmo0JO6GvaWARaDBX 3KLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:mime-version; bh=Q9X6x+e06UI3F0nFfey9N+d4GzFycyXwhSyw0wNHAoM=; b=t0VPibLVY692uzbFk10HKOxEVvv8qT4od3zkd0v6IiuoZh3OAiNt64lyINm9S86xLK B6ni4mmlf/vPe5vXMf9NT4dZkvuUc17XcauuGn/Nju+5XQXX4q7E8JBz59IaZCcmhM7G HgG08MXhJI8yu1M1TKfKX/5Wk1no1yIqlU4zK3LnWCDw7LdyKkEbVz9BwMgDmXAr3j99 hTJX+/sirt6V6/ai3qJKqZLIaHAsZJXPQMvR0QW0q5FLjREbJ41hpo/laKFpgrUIzY5Q nh2qobq2iYc2+S3z2Z1lILFXWg3H6T+9Jo8ImzkjGfe0AeyQQH3QH54jpmar+PhlJC9R xpSQ== X-Gm-Message-State: AOAM531dJ3OwBvGQ3lA3QUIr6fs44ct1XJZLcStiW5lOWFLxvO3he4NS 5oAffJdbHrzLms7Tk8k8eZ20uAnEHI8W4A== X-Google-Smtp-Source: ABdhPJy1mPFZdTV6u7yu9rPEj0wQhy04nRt7CBu3R3Zq1iXrJI7Z/fTfPEVeZiAvIN62K8ckeD9iYA== X-Received: by 2002:a17:90a:28a5:: with SMTP id f34mr23217865pjd.107.1626675702870; Sun, 18 Jul 2021 23:21:42 -0700 (PDT) Received: from [2620:15c:17:3:2c04:af17:8ee7:e439] ([2620:15c:17:3:2c04:af17:8ee7:e439]) by smtp.gmail.com with ESMTPSA id g8sm17319817pfu.30.2021.07.18.23.21.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Jul 2021 23:21:42 -0700 (PDT) Date: Sun, 18 Jul 2021 23:21:41 -0700 (PDT) From: David Rientjes To: vjitta@codeaurora.org cc: cl@linux.com, penberg@kernel.org, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, vbabka@suse.cz, linux-mm@kvack.org, linux-kernel@vger.kernel.org, vinmenon@codeaurora.org Subject: Re: [PATCH] mm: slub: Fix slub_debug disablement for list of slabs In-Reply-To: <1626176750-13099-1-git-send-email-vjitta@codeaurora.org> Message-ID: References: <1626176750-13099-1-git-send-email-vjitta@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=google.com header.s=20161025 header.b=RVVEon+a; spf=pass (imf16.hostedemail.com: domain of rientjes@google.com designates 209.85.216.48 as permitted sender) smtp.mailfrom=rientjes@google.com; dmarc=pass (policy=reject) header.from=google.com X-Rspamd-Server: rspam05 X-Stat-Signature: jpyof9z9jzut6nk7fbi3woxps7jaca1r X-Rspamd-Queue-Id: 06BA1F000095 X-HE-Tag: 1626675703-296166 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, 13 Jul 2021, vjitta@codeaurora.org wrote: > From: Vijayanand Jitta > > Consider the scenario where CONFIG_SLUB_DEBUG_ON is set > and we would want to disable slub_debug for few slabs. > Using boot parameter with slub_debug=-,slab_name syntax > doesn't work as expected i.e; only disabling debugging for > the specified list of slabs, instead it disables debugging > for all slabs. Fix this. > > Signed-off-by: Vijayanand Jitta > --- > mm/slub.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/mm/slub.c b/mm/slub.c > index dc863c1..5a88418 100644 > --- a/mm/slub.c > +++ b/mm/slub.c > @@ -1429,6 +1429,7 @@ static int __init setup_slub_debug(char *str) > char *slab_list; > bool global_slub_debug_changed = false; > bool slab_list_specified = false; > + bool slab_list_debug_disable = true; > > slub_debug = DEBUG_DEFAULT_FLAGS; > if (*str++ != '=' || !*str) > @@ -1436,7 +1437,6 @@ static int __init setup_slub_debug(char *str) > * No options specified. Switch on full debugging. > */ > goto out; > - > saved_str = str; > while (str) { > str = parse_slub_debug_flags(str, &flags, &slab_list, true); > @@ -1445,6 +1445,8 @@ static int __init setup_slub_debug(char *str) > slub_debug = flags; > global_slub_debug_changed = true; > } else { > + if (flags || !IS_ENABLED(CONFIG_SLUB_DEBUG_ON)) Could you explain the check for CONFIG_SLUB_DEBUG_ON here? I don't believe that using `-' for slub_debug is *only* useful when CONFIG_SLUB_DEBUG_ON is enabled. > + slab_list_debug_disable = false; > slab_list_specified = true; > } > } > @@ -1456,7 +1458,7 @@ static int __init setup_slub_debug(char *str) > * long as there is no option specifying flags without a slab list. > */ > if (slab_list_specified) { > - if (!global_slub_debug_changed) > + if (!global_slub_debug_changed && !slab_list_debug_disable) > slub_debug = 0; > slub_debug_string = saved_str; > }