Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3712346pxj; Tue, 1 Jun 2021 11:24:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2VpGDvLzCV4tPs/H7/OtAyzp1fIKKvfPgPvQZkY9uFFAZpxVJTufe1z3/dFkPCj1fSHx5 X-Received: by 2002:a50:c8c3:: with SMTP id k3mr14553375edh.318.1622571879844; Tue, 01 Jun 2021 11:24:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622571879; cv=none; d=google.com; s=arc-20160816; b=fbV17Yvej0IF937wUY0ixD0qT45OLEk6H3XzUfS4R7an0Z7DOCC2Mys3AqsEczhvnE 5qu0My4J0yjSbfozqWSq1ve+XBI8a8MSUNckVH/XHfie3/paX35Zv4KXp+UZPxC5WK6k /WWaBHsi/oImLHL1cPLf2wgcALLwUziD/cYWbSH5OD3abUyrqeIUcZkoqmwPxK5nEwBI dQLun1lICYZYqTdOUVaBFz2LVTeLetQDhFWQw0rrCeZagsk5W2sUqx0J9eidQQqiMLob U17bjUoIctOXYkYKz+zfk2RA1+SD9uUMEeYoIDCPhUn1CibC3zu67Yom1tTdufcQQUuE YYHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gbZ3vTsrf7AL1s4OczZvI0d4Xr6vFtsv5qsCFIFr27E=; b=m5o1UGS3YIBGH2jdIwF+H517x271s0cWhh3QFe/DMLdcsMb8i0nAhd2BCStLili8Ul t6qksU7eKR9VZu8dTznvt0pqxVR3YYqqyEXNuXElBpJpvdPOqfder5ffoelL/ktyRcE9 lK7G5TmnOj1NRA3xglvkP4jK+AikUDopGMuieDB1zTjE+iXw9jw7lxo8oIMdeEUQuTzQ Lil+mQ34TZz02wiE3TcmgO2gF/jAh1J3A7BxyLwvO491Xd34QksWa1zgW5EIFkEUfuwV jKJXlZ5EhOkwfq+SKpB4iGtA0D0jRP4OxrRZ5AwW8GXA+qW6kEbMUUFBIU6oNDPtOqeF nfQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="gl9HxPe/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z21si7183168ejf.623.2021.06.01.11.24.16; Tue, 01 Jun 2021 11:24:39 -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; dkim=pass header.i=@chromium.org header.s=google header.b="gl9HxPe/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234713AbhFASXu (ORCPT + 99 others); Tue, 1 Jun 2021 14:23:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234704AbhFASXt (ORCPT ); Tue, 1 Jun 2021 14:23:49 -0400 Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0ABEC06174A for ; Tue, 1 Jun 2021 11:22:06 -0700 (PDT) Received: by mail-pg1-x533.google.com with SMTP id l1so57949pgm.1 for ; Tue, 01 Jun 2021 11:22:06 -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=oJJ8aLZkFCVFM9OA62HokFWz4DwuE9cee2LIGpIRHBQ3jd704bBGMSw86bBc4lBZEG UOC3nCEU+62NwOGzBKAIx1Mx5aZTFwzZJ8BloPgXKHp5E6IlrhefyC8k6lxXobSsoI6H kltiGULE7vdOTi2qO/zoGsdMQmfxKKvSKx+PtzA3hKbH234kr03kSAqHD2yz8pPCHsf/ r5jgujKl6fARjcPmu1F3hRsZqxJ3J6UrhyJlGvz4JxfMZ4sr32K0GBw/ez/yLOKho3hn ItiQrkcqwVUVw1YsUV75b7vIQOtzIqiesdg33C0D/4DLlvv5E2QhqHCIfJyyn/UFYamr HLug== X-Gm-Message-State: AOAM532GrUMdmFKQ0AVTlMHgGqmaxlKAGX4InnQuWKE+V5hjpl0HNHeb iUFf5HVE6TWtWThgL/pzjWtNeg== 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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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)) -- https://chromeos.dev