From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758222AbcFANhU (ORCPT ); Wed, 1 Jun 2016 09:37:20 -0400 Received: from mail-qk0-f173.google.com ([209.85.220.173]:33532 "EHLO mail-qk0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752956AbcFANhR (ORCPT ); Wed, 1 Jun 2016 09:37:17 -0400 From: Daniel Bristot de Oliveira X-Google-Original-From: Daniel Bristot de Oliveira Subject: Re: [RFC PATCH 2/2] sched: sysctl: Panic on scheduling while atomic To: Peter Zijlstra References: <654ac2ba100f609917b68d1c6a33331ec9df8da4.1464652607.git.bristot@redhat.com> <20160601094544.GP3190@twins.programming.kicks-ass.net> Cc: linux-kernel@vger.kernel.org, Jonathan Corbet , "Paul E. McKenney" , Josh Triplett , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Ingo Molnar , Arnaldo Carvalho de Melo , "Luis Claudio R. Goncalves" Message-ID: Date: Wed, 1 Jun 2016 10:37:11 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <20160601094544.GP3190@twins.programming.kicks-ass.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/01/2016 06:45 AM, Peter Zijlstra wrote: > Do we really need more panic_on_* knobs? Can't we re-purpose > panic_on_warn for this? I think this case is very specific, specific enough to deserve its own sysctl. But I see your point, and the possibilities I can see are: 1) convert the printk(KERN_ERR "BUG:...") to a WARN(1,"BUG:..."), but this will hide all other information printed in the function, so -1 for this option; 2) fire a WARN in the end of the function with a message like the previous printk(); or 3) re-use the panic_on_warn variable to condition the panic, or to force a WARN. But, IMHO, I think these are not as polish as use a specific sysctl. If you think that any of these options are better than what I propose, I can cook a v2 with the best option :-). -- Daniel