From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6704D1007D2 for ; Fri, 23 Jul 2010 15:11:59 +1000 (EST) Subject: Re: [PATCH][RFC] preempt_count corruption across H_CEDE call with CONFIG_PREEMPT on pseries From: Benjamin Herrenschmidt To: Darren Hart In-Reply-To: <4C491E14.9010100@us.ibm.com> References: <4C488CCD.60004@us.ibm.com> <1279837509.1970.24.camel@pasglop> <4C48DADE.1050409@us.ibm.com> <4C491E14.9010100@us.ibm.com> Content-Type: text/plain; charset="UTF-8" Date: Fri, 23 Jul 2010 15:09:27 +1000 Message-ID: <1279861767.1970.73.camel@pasglop> Mime-Version: 1.0 Cc: Stephen Rothwell , Gautham R Shenoy , Steven Rostedt , linuxppc-dev@ozlabs.org, Will Schmidt , Paul Mackerras , Thomas Gleixner List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Thu, 2010-07-22 at 21:44 -0700, Darren Hart wrote: > suggestion I updated the instrumentation to display the > local_save_flags and irqs_disabled_flags: > Jul 22 23:36:58 igoort1 kernel: local flags: 0, irqs disabled: 1 > Jul 22 23:36:58 igoort1 kernel: before H_CEDE current->stack: c00000010e9e3ce0, pcnt: 1 > Jul 22 23:36:58 igoort1 kernel: after H_CEDE current->stack: c00000010e9e3ce0, pcnt: 1 > > I'm not sure if I'm reading that right, but I believe interrupts are > intended to be disabled here. If accomplished via the > spin_lock_irqsave() this would behave differently on RT. However, this > path disables the interrupts handled by xics, all but the IPIs anyway. > On RT I disabled the decrementer as well. > > Is it possible for RT to be receiving other interrupts here? Also you may want to call hard_irq_disable() to -really- disable interrupts ... since we do lazy-disable on powerpc Cheers, Ben.