From patchwork Tue Jun 1 18:21:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 12292057 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=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 03CD9C4708F for ; Tue, 1 Jun 2021 18:22:09 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A9C96613B4 for ; Tue, 1 Jun 2021 18:22:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A9C96613B4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4E4A56B006E; Tue, 1 Jun 2021 14:22:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4BC566B0070; Tue, 1 Jun 2021 14:22:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 383176B0071; Tue, 1 Jun 2021 14:22:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0113.hostedemail.com [216.40.44.113]) by kanga.kvack.org (Postfix) with ESMTP id 08BD66B006E for ; Tue, 1 Jun 2021 14:22:07 -0400 (EDT) Received: from smtpin40.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 8E770DB29 for ; Tue, 1 Jun 2021 18:22:07 +0000 (UTC) X-FDA: 78205974294.40.81FE976 Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) by imf02.hostedemail.com (Postfix) with ESMTP id 5AE8A4202A18 for ; Tue, 1 Jun 2021 18:22:00 +0000 (UTC) Received: by mail-pf1-f176.google.com with SMTP id k15so153155pfp.6 for ; Tue, 01 Jun 2021 11:22:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gbZ3vTsrf7AL1s4OczZvI0d4Xr6vFtsv5qsCFIFr27E=; b=gl9HxPe/5Z8AZ2F4lr8ZOQp71MrPbaaCd3bdahqNcnUNrrTlGjg5u/ICfWAiyRjVew ASq2B4Gz6GujPk3KXnFH5fOEp8Z1NMTELKHy8lWKksJWVQlCZ4Pp7UNfjJCWha2HgcDA NniNd3QIrYT4zBskN6hBzikQ4+SKWS0mscod0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gbZ3vTsrf7AL1s4OczZvI0d4Xr6vFtsv5qsCFIFr27E=; b=RDlI3d6lEeadEJJnnhzo8szwFT2MDTXC223SXioxREYgCaLavPyEbVtbeT9/22Q7O6 s3noK/MT6Mch/caYGtJMmi9Wu5mmUF16QMqMZ2CoQqQx7cYjkIFvN+TN26mTXxrJmjdr UwGQ7lkv+GNWuWuj5JyvvDEabXTgO0ASJNx1R1waqulEiOGCZtUnSp0T6AeA/zAJQfrY EscvVrbMRGnTyool6K8hXz2Lte41mUTX7I5Bi+A0HGc0Oh7Ypwao6lkFxTiC/MdUVKjy L+MyDE8z8wkJsVtdESCroJ26T6QR7Ixm8lbWEmGQCWvo21bJUWM/WtJpLxQVY31zgkRv sK3A== X-Gm-Message-State: AOAM531gySsNjrvcEHZXhqAOlK8c+OdZl+dlWzhwwq+48qQmwpwhrB4W 7OLcQNJtsSgIISV39suDbXDq1A== X-Google-Smtp-Source: ABdhPJzvfjCxaSvx+ixy+qezmQZI5gNBZyHO3mHp4A+To1c+U0lrFaUSUqRwdNIxEQ6QmDq4d3KE4g== X-Received: by 2002:a62:3344:0:b029:24c:735c:4546 with SMTP id z65-20020a6233440000b029024c735c4546mr23503691pfz.1.1622571726225; Tue, 01 Jun 2021 11:22:06 -0700 (PDT) Received: from smtp.gmail.com ([2620:15c:202:201:ee82:b2a7:c8bd:18e7]) by smtp.gmail.com with ESMTPSA id g29sm14510982pgm.11.2021.06.01.11.22.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Jun 2021 11:22:05 -0700 (PDT) From: Stephen Boyd To: Andrew Morton Cc: linux-kernel@vger.kernel.org, Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Vlastimil Babka , linux-mm@kvack.org, Petr Mladek , Joe Perches , Muchun Song Subject: [PATCH v3 1/4] slub: Restore slub_debug=- behavior Date: Tue, 1 Jun 2021 11:21:59 -0700 Message-Id: <20210601182202.3011020-2-swboyd@chromium.org> X-Mailer: git-send-email 2.32.0.rc0.204.g9fa02ecfa5-goog In-Reply-To: <20210601182202.3011020-1-swboyd@chromium.org> References: <20210601182202.3011020-1-swboyd@chromium.org> MIME-Version: 1.0 Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b="gl9HxPe/"; dmarc=pass (policy=none) header.from=chromium.org; spf=pass (imf02.hostedemail.com: domain of swboyd@chromium.org designates 209.85.210.176 as permitted sender) smtp.mailfrom=swboyd@chromium.org X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 5AE8A4202A18 X-Stat-Signature: xgttsh1iog79aumyzw3yusiua61bh1rt X-HE-Tag: 1622571720-108306 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: Passing slub_debug=- on the kernel commandline is supposed to disable slub debugging. This is especially useful with CONFIG_SLUB_DEBUG_ON where the default is to have slub debugging enabled in the build. Due to some code reorganization this behavior was dropped, but the code to make it work mostly stuck around. Restore the previous behavior by disabling the static key when we parse the commandline and see that we're trying to disable slub debugging. Acked-by: Vlastimil Babka Reviewed-by: Muchun Song Fixes: ca0cab65ea2b ("mm, slub: introduce static key for slub_debug()") Signed-off-by: Stephen Boyd --- mm/slub.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mm/slub.c b/mm/slub.c index 438fa8d4c970..2f53e8a9c28e 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1396,6 +1396,8 @@ static int __init setup_slub_debug(char *str) out: if (slub_debug != 0 || slub_debug_string) static_branch_enable(&slub_debug_enabled); + else + static_branch_disable(&slub_debug_enabled); if ((static_branch_unlikely(&init_on_alloc) || static_branch_unlikely(&init_on_free)) && (slub_debug & SLAB_POISON))