Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4114311imu; Mon, 28 Jan 2019 17:43:59 -0800 (PST) X-Google-Smtp-Source: ALg8bN7aVqEtQp8SkqRMXIAAU+2V5LhhAQ61Mgk3LQ4wL2y4ASqZoSLCK8mpbjUJAi7VFUuCM1TK X-Received: by 2002:a63:2ac9:: with SMTP id q192mr22006418pgq.58.1548726239422; Mon, 28 Jan 2019 17:43:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548726239; cv=none; d=google.com; s=arc-20160816; b=CvRJrDTZOIfiAWBwlawxzcaoyanyILVXJtgflfsJtFcLs+QtHfbbeMVWT+NyABR8QI 0jPx8MJsp9lNkX0BOVWpJHh4QJV506ZCYHEQYMZdUYdIA90Bx88OZvugkSdI03r9SIEL hKP5pfxvCG3d64fyOPzV48qh3FCxg931NZtL2esKa58VbfYLpcatSWaopjFZHTEdrv+X Bk5TT83IkTq3w1cJIAenySYfjc/msSunG5PrEpwF7jH97yp5d5AlEkV7ovxd7gKgm7pv Is+ksYAfj9zISvhAioxHi0iEWzm2tIQfew9e0lgO22ZPktWkKsVjqdtmDAospzT8ecJM rn+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=CgA3sRNVMXk7js4c/E/CVOZKEVaE8DANGoI5NS4jIsA=; b=D4Y0yHKG+2i2m0KVI46piyJowgz74KQzlI7G8SNio2HPtSSN0X3fk4DIhNoD/ybU4X IKgQ7V9IgtOXic52nktW4wJbaQJxVpgxaG4Q2aYy1GfzKipzzYp00ZuJMR+VSIPnEQ5d WDNBvnC1e+ORGbos8yTQjJ/0c63VZjlgiPwAZxT1ZIQazYHobEYzOs+jgHImGz8y+U+5 WuzhU+Yhcg2Fn90ZmS7f4D+3Y9RjCUUim3nYJgBMLFKYBf4c8C37K5xLCrCpyCeI83aX ipyb1GUikQxfEsemkVprlGbYsaUxnTBxnN/NJJjQL/Be6gLsMMSDvlQEjI4+2aqHG+ZS LAEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="PFO/i6rh"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v7si34266806plo.12.2019.01.28.17.43.43; Mon, 28 Jan 2019 17:43:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="PFO/i6rh"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726998AbfA2BmG (ORCPT + 99 others); Mon, 28 Jan 2019 20:42:06 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:38934 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726786AbfA2BmF (ORCPT ); Mon, 28 Jan 2019 20:42:05 -0500 Received: by mail-wm1-f66.google.com with SMTP id y8so15932919wmi.4 for ; Mon, 28 Jan 2019 17:42:04 -0800 (PST) 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 :user-agent:mime-version; bh=CgA3sRNVMXk7js4c/E/CVOZKEVaE8DANGoI5NS4jIsA=; b=PFO/i6rhgf+YNrmRAo/R4/wZcZPGj6tRLfu+GLooakQVPwy4w3hgE1wFIEOX3TUidu FDuZuRhUsqVyTdGt7/Sbog4uLx+au2Wc+ki1mv2g4elLshnxy4VunOiv1wZdKdmDEooj JOvh0JdwciQX49Q6T7hVZg6bYAK8Sh6VQ46xUoP9EuImPbiODZTOhm75d0956bAayfRZ kiY6mkHGWMbxymUPtEmdYUaCiTnTc6R/Ad8Yuy+WeYXZNTn9WVnn6rPKPKbjEeiC1ah0 ICDZMIsGrJvVazGVIpyYvnx1jfv4Z14alRWHdurPDC80P5jlxJYuua66USDLCuGzzmM8 WKxw== 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:user-agent:mime-version; bh=CgA3sRNVMXk7js4c/E/CVOZKEVaE8DANGoI5NS4jIsA=; b=tl5rgVsfaV/aGwRvTOPnueusf8aws23ac1P5mrMQLCoFargUnJHWEE8RmJQwPsSzfq k/0fcImvs7TmETKbCmRPaQ+SV+b1TTTfBBCzlWUt36hcabONDNZrwK1SPs37n8tJLPfo SWMc33BH3wQqBy7gpsmXPu7xCg/YxtgaPrB3EtJqbIFOwlKl3xpybAUJHZeHm5Kr5thd hoqEMVviDpDHx2oeVl0daYW79mU4lGmXtGnWX+uvU5BVRuQVFUpapvrOCY4Al9BiKBn8 L+RY1OZC4Q3QHRrzMeqsr+JptJ55HaghZhkh7/JXTo03zY0kZDmg9aPwFEgit/RN+ClA Wasw== X-Gm-Message-State: AJcUukf0Ht0JXDdEX6Rc1MxzQJ5//0NY91wTLKVmWA/xPJGi1wXFZxGR FwU8HihrbZ2Q/9n9IlU5oRAtEA== X-Received: by 2002:a1c:bdc5:: with SMTP id n188mr20341571wmf.69.1548726123691; Mon, 28 Jan 2019 17:42:03 -0800 (PST) Received: from [2620:15c:17:3:3a5:23a7:5e32:4598] ([2620:15c:17:3:3a5:23a7:5e32:4598]) by smtp.gmail.com with ESMTPSA id h1sm1237956wmb.0.2019.01.28.17.42.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Jan 2019 17:42:02 -0800 (PST) Date: Mon, 28 Jan 2019 17:41:59 -0800 (PST) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Miles Chen cc: Christoph Lameter , Pekka Enberg , Joonsoo Kim , Andrew Morton , Jonathan Corbet , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: Re: [PATCH v2] mm/slub: introduce SLAB_WARN_ON_ERROR In-Reply-To: <1548313223-17114-1-git-send-email-miles.chen@mediatek.com> Message-ID: References: <1548313223-17114-1-git-send-email-miles.chen@mediatek.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 24 Jan 2019, miles.chen@mediatek.com wrote: > From: Miles Chen > > When debugging slab errors in slub.c, sometimes we have to trigger > a panic in order to get the coredump file. Add a debug option > SLAB_WARN_ON_ERROR to toggle WARN_ON() when the option is set. > Wouldn't it be better to enable/disable this for all slab caches instead of individual caches at runtime? I'm not sure excluding some caches because you know they'll WARN and trigger panic_on_warn unnecessarily is valid since it could be enabled for that cache as well through this interface.