From patchwork Wed May 26 02:56:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 12280541 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 36EABC4707F for ; Wed, 26 May 2021 02:56:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D627861439 for ; Wed, 26 May 2021 02:56:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D627861439 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 BA4706B006E; Tue, 25 May 2021 22:56:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B2D686B0070; Tue, 25 May 2021 22:56:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 793126B0071; Tue, 25 May 2021 22:56:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0059.hostedemail.com [216.40.44.59]) by kanga.kvack.org (Postfix) with ESMTP id 28EB36B0070 for ; Tue, 25 May 2021 22:56:30 -0400 (EDT) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id BF9088783 for ; Wed, 26 May 2021 02:56:29 +0000 (UTC) X-FDA: 78181868898.18.FA71EE3 Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) by imf29.hostedemail.com (Postfix) with ESMTP id D51792C5 for ; Wed, 26 May 2021 02:56:20 +0000 (UTC) Received: by mail-pj1-f45.google.com with SMTP id cu11-20020a17090afa8bb029015d5d5d2175so14394030pjb.3 for ; Tue, 25 May 2021 19:56:29 -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=E+qg4jIrttxlFVkdbLIETuAL+zofyp/t4lnCyo9LNjI=; b=LzSYhkjsHh23YhWgMnNmNO8cO/5y325J/84epdfzKWfq7U2VkjubGjDZCvpGVk+j2s AYdDadQ6kU0gNCS2IuKq/S/JfMQnx6oBQBxYGjmPe1V53N+9Ce/faQAWMBWqTA1wht0z GNvlJJ/owAra5Lg/43IcczDmqj5uneFN3HuDA= 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=E+qg4jIrttxlFVkdbLIETuAL+zofyp/t4lnCyo9LNjI=; b=o1HT+WkSBN4b24ifq8WcJ6upfOdtrL8oNzAjdYI9Vd0nXEMfn0JCvLH3LRiBCnRWtr UpX+dYHpA4h9iP7GUGOXsjx+VnOXOvDb5rJxKp+J6Vgjfs7Pn1q13n4uFx5MRXfWoEtK XbQMOeT9fMv6Hn8nixojWdrI4PZcLHpHAbNmDjxr8QZ6IG2/OzlQUue4ZuLydz006Mdv UpyUvZSaN2gRAbG3sm0t+xu+2XIcXX9gwt34GaNmS5mKSmVGzJb0OcVOLp1vVOpHuS39 +TCJGlwsmAL9r/6XE37Vzd1sUQoAntXp845hKLJTf8b7CIa1i90CrS3U4quIV8CQwHbY YqRQ== X-Gm-Message-State: AOAM532A2WGyJPIOINMwqHPJK+1EsravdkGvR3NnuKkGN34AlGGYU/6l tTSQbwgFDRBOh65yXKsg3R6m4w== X-Google-Smtp-Source: ABdhPJw90TzOK5s5zE3FuQZB4GRrdGZ6P7/To8y5OXqOVwu+pKobI6Iyyq8FViZVLm9oM1zSUbx5Gg== X-Received: by 2002:a17:90b:100f:: with SMTP id gm15mr34218931pjb.197.1621997788800; Tue, 25 May 2021 19:56:28 -0700 (PDT) Received: from smtp.gmail.com ([2620:15c:202:201:5a1b:e4e5:eb10:8870]) by smtp.gmail.com with ESMTPSA id 5sm2966295pjo.17.2021.05.25.19.56.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 May 2021 19:56:28 -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 Subject: [PATCH v2 1/4] slub: Restore slub_debug=- behavior Date: Tue, 25 May 2021 19:56:22 -0700 Message-Id: <20210526025625.601023-2-swboyd@chromium.org> X-Mailer: git-send-email 2.31.1.818.g46aad6cb9e-goog In-Reply-To: <20210526025625.601023-1-swboyd@chromium.org> References: <20210526025625.601023-1-swboyd@chromium.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: D51792C5 Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=LzSYhkjs; spf=pass (imf29.hostedemail.com: domain of swboyd@chromium.org designates 209.85.216.45 as permitted sender) smtp.mailfrom=swboyd@chromium.org; dmarc=pass (policy=none) header.from=chromium.org X-Rspamd-Server: rspam04 X-Stat-Signature: o3o8pgekwfe94scbwf7snwnei3zgw448 X-HE-Tag: 1621997780-257395 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. Cc: Vlastimil Babka Fixes: e17f1dfba37b ("mm, slub: extend slub_debug syntax for multiple blocks") Signed-off-by: Stephen Boyd Acked-by: Vlastimil Babka Reviewed-by: Muchun Song --- 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))