Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1103248ybz; Fri, 1 May 2020 14:41:32 -0700 (PDT) X-Google-Smtp-Source: APiQypJBfaFxqxRfxN/cLL9zObqEOOOdO6+8pLOBY4R7q85JgRLe49fsjOkYvhrkyR2EbR2DgUnh X-Received: by 2002:a17:906:4e46:: with SMTP id g6mr5176107ejw.36.1588369292440; Fri, 01 May 2020 14:41:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588369292; cv=none; d=google.com; s=arc-20160816; b=WjtnNLG6/c95FKOwYUChl/RY26OTlmqyGXdRgyVy9vA2NX539xz81VZETCuFSvsD5Y uW7A4PG1l1a1Iz5QvImr2oL7hX4znGz7Wtdos5Um+BpqUL+KhJZlI/U8V/XsorTVqR6o mYGAYPlT9mGSQIQb4tGBzy3AR2dMxQYGxUepd5QZTwuu/P0H7BvcBYp85DdHImyUXXYM Urms/aSM2RntdlWIcjsw88u6OlMUbOYOCSZkNvdQqmnfUs+0k4EKPBzKTsshMq/zfHfI jMaZkpMW0isnsUDdMTyTFVszkLHLpXDWOafk1E4u6cbj+vnz5+875IEuLxtS5pcQi64I v6iA== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=XFdlDLXfOMELtTlX1jlrs3VeRTrKFpIgwpgR+5/5OeE=; b=IwgAlVOFgttMl2hn5KZEZl4XAyo0sI42L9pyItWHCtkLj8BI2EMeEa4z8ccKCQ41xb nX6abD0LrcGM38Tjf1A2E2OJa2PZEkw+eFnVgX0rMgGTJcoE6aWmxayyo4+B7OzqOsSE yCO01ZkNYxraaA9kbx6r3/Uvo1OmxEPkqFrHnPNFTDODF2st2SeH3yGf9vhh7IJWxT1j kI039sNfuXS7NvU3eB+Mhj2TsxR3WqwSsG4uv9zrisWCmpV0g5x54mZ5KLO9WN36LYZk si4LwRqdukwuVRatnfgz0iBYbrJ/8fwynVbi7XXJTPvLLs9LV93emagSiGdP9zzIxb/r i+sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EE0JWT4Q; 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 k9si2533746edj.96.2020.05.01.14.41.09; Fri, 01 May 2020 14:41:32 -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=@kernel.org header.s=default header.b=EE0JWT4Q; 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 S1726754AbgEAVhw (ORCPT + 99 others); Fri, 1 May 2020 17:37:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:47468 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726045AbgEAVhw (ORCPT ); Fri, 1 May 2020 17:37:52 -0400 Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E96CE208DB; Fri, 1 May 2020 21:37:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588369072; bh=rcMy9hOYjnMdOayqZO4Al68Sx1wGMaF1BzVTkCR2gEI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=EE0JWT4QbsM5NXoYqeGRwX35IXmZwZDtWMmG79PhEJMPg/dW6L2Ekb5n6GRYDVAG1 S2D3DFiTj80Uo0hKoZzajmP8k6tZ2Df6C3vWJHZKE6+8GlLTwRLKvvuHIFslK9OofV A8JTM9gcNPlIMEGLm4/fvLhC/zRG3SSadWhrPPKw= Date: Fri, 1 May 2020 14:37:51 -0700 From: Andrew Morton To: Rafael Aquini Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, iamjoonsoo.kim@lge.com, rientjes@google.com, penberg@kernel.org, cl@linux.com Subject: Re: [PATCH] mm: slub: add panic_on_error to the debug facilities Message-Id: <20200501143751.97a25bb7f89f8d93ec443868@linux-foundation.org> In-Reply-To: <20200501211540.71216-1-aquini@redhat.com> References: <20200501211540.71216-1-aquini@redhat.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 1 May 2020 17:15:40 -0400 Rafael Aquini wrote: > Sometimes it is desirable to override SLUB's debug facilities > default behavior upon stumbling on a cache or object error > and just stop the execution in order to grab a coredump, at > the error-spotting time, instead of trying to fix the issue > and report in an attempt to keep the system rolling. > > This patch introduces a new debug flag SLAB_PANIC_ON_ERROR, > along with its related SLUB-machinery, in order to extend > current slub_debug facilites and provide the aforementioned > behavior override. > Sees reasonable. > --- a/Documentation/vm/slub.rst > +++ b/Documentation/vm/slub.rst > @@ -54,6 +54,8 @@ Possible debug options are:: > caused higher minimum slab orders > - Switch all debugging off (useful if the kernel is > configured with CONFIG_SLUB_DEBUG_ON) > + C Toggle panic on error (crash) to allow for post-mortem > + analysis of a coredump taken at the error-spotting time nit: "toggle" means to switch to the other state. But what we're doing here is to set to the "on" state. This: --- a/Documentation/vm/slub.rst~mm-slub-add-panic_on_error-to-the-debug-facilities-fix +++ a/Documentation/vm/slub.rst @@ -49,12 +49,12 @@ Possible debug options are:: P Poisoning (object and padding) U User tracking (free and alloc) T Trace (please only use on single slabs) - A Toggle failslab filter mark for the cache + A Enable failslab filter mark for the cache O Switch debugging off for caches that would have caused higher minimum slab orders - Switch all debugging off (useful if the kernel is configured with CONFIG_SLUB_DEBUG_ON) - C Toggle panic on error (crash) to allow for post-mortem + C Enable panic on error (crash) to allow for post-mortem analysis of a coredump taken at the error-spotting time F.e. in order to boot just with sanity checks and red zoning one would specify:: _