From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757831AbcFAJpw (ORCPT ); Wed, 1 Jun 2016 05:45:52 -0400 Received: from merlin.infradead.org ([205.233.59.134]:49469 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757333AbcFAJpv (ORCPT ); Wed, 1 Jun 2016 05:45:51 -0400 Date: Wed, 1 Jun 2016 11:45:44 +0200 From: Peter Zijlstra To: Daniel Bristot de Oliveira 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" Subject: Re: [RFC PATCH 2/2] sched: sysctl: Panic on scheduling while atomic Message-ID: <20160601094544.GP3190@twins.programming.kicks-ass.net> References: <654ac2ba100f609917b68d1c6a33331ec9df8da4.1464652607.git.bristot@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <654ac2ba100f609917b68d1c6a33331ec9df8da4.1464652607.git.bristot@redhat.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 31, 2016 at 04:07:33PM -0300, Daniel Bristot de Oliveira wrote: > Currently, a schedule while atomic error prints the stack trace to the > kernel log and the system continue running. > > Although it is possible to collect the kernel log messages and analyse > it, often more information are needed. Furthermore, keep the system > running is not always the best choice. For example, when the preempt > count underflows the system will not stop to complain about scheduling > while atomic, so the kernel log can wraparound overwriting the first > stack trace, tuning the analysis even more difficult. > > This patch implements the kernel.panic_on_sched_in_atomic sysctl to > help out on these more complex situations. > > When kernel.panic_on_sched_in_atomic is set to 1, the kernel will > panic() in the schedule while atomic detection. Do we really need more panic_on_* knobs? Can't we re-purpose panic_on_warn for this?