From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965018AbbI2NOg (ORCPT ); Tue, 29 Sep 2015 09:14:36 -0400 Received: from www.linutronix.de ([62.245.132.108]:39048 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964851AbbI2NO3 (ORCPT ); Tue, 29 Sep 2015 09:14:29 -0400 Date: Tue, 29 Sep 2015 15:13:50 +0200 (CEST) From: Thomas Gleixner To: Peter Zijlstra cc: mingo@kernel.org, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, fweisbec@gmail.com, oleg@redhat.com, umgwanakikbuti@gmail.com, rostedt@goodmis.org Subject: Re: [RFC][PATCH 04/11] sched: Rework TASK_DEAD preemption exception In-Reply-To: <20150929093520.037072067@infradead.org> Message-ID: References: <20150929092825.540553633@infradead.org> <20150929093520.037072067@infradead.org> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001,URIBL_BLOCKED=0.001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 29 Sep 2015, Peter Zijlstra wrote: > TASK_DEAD is special in that the final schedule call from do_exit() > must be done with preemption disabled. > > This leads to a violation of our new scheduling invariant which states > that the preempt count should be 2. Move the check for TASK_DEAD out > of the debug check and use it to decrement the preempt count (from 2 > to 1). Reviewed-by: Thomas Gleixner