From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA303C19F2A for ; Thu, 11 Aug 2022 21:28:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234908AbiHKV2q (ORCPT ); Thu, 11 Aug 2022 17:28:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229591AbiHKV2m (ORCPT ); Thu, 11 Aug 2022 17:28:42 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E64889D8DF; Thu, 11 Aug 2022 14:28:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=VU1PZeaw6I4YyL6iOFs+wCjPWpBvnmOGKLSrFWd0G/s=; b=QG7bP6FilsSAZ571eM1Q1YCap/ VairpPnmpDhpHxSQR4JS2J4Z5dAqMi3Un8zuDp5WS0PbP1J8VXlrX7PfxIAVNcyI9XmqSCq22gPe7 SfTw9evl2A6qLn4poujnmCxcYlJlceCXSwEzvzlV4sAT6WN3LL0gvtXjwB6aep7QK18YbwO7iwCf1 0l9DxZcYbik86ikCHjgWVeXU/j5jyiBpdautmducKWbre7hkqkwLao4BRUawDVVXOVWOr6H+p39Y8 hoOiHExMgtVPHTWNiPuN5DJJOwYodocQ25wXfybxbHaupoN5bL8C0m9HEn1fUnWr6K2KZZmaSBgnB QYLqbiuA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1oMFj9-001IJD-45; Thu, 11 Aug 2022 21:28:27 +0000 Date: Thu, 11 Aug 2022 22:28:27 +0100 From: Matthew Wilcox To: Linus Torvalds Cc: Ingo Molnar , David Hildenbrand , linux-kernel@vger.kernel.org, linux-mm@kvack.org, stable@vger.kernel.org, Andrew Morton , Greg Kroah-Hartman , Axel Rasmussen , Peter Xu , Hugh Dickins , Andrea Arcangeli , Vlastimil Babka , John Hubbard , Jason Gunthorpe , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Mel Gorman Subject: Re: [PATCH] sched/all: Change BUG_ON() instances to WARN_ON() Message-ID: References: <20220808073232.8808-1-david@redhat.com> <1a48d71d-41ee-bf39-80d2-0102f4fe9ccb@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 11, 2022 at 01:43:09PM -0700, Linus Torvalds wrote: > May I suggest going one step further, and making these WARN_ON_ONCE() instead. > > >From personal experience, once some scheduler bug (or task struct > corruption) happens, ti often *keeps* happening, and the logs just > fill up with more and more data, to the point where you lose sight of > the original report (and the machine can even get unusable just from > the logging). I've been thinking about magically turning all the WARN_ON_ONCE() into (effectively) WARN_ON_RATELIMIT(). I had some patches in that direction a while ago but never got round to tidying them up for submission.