From mboxrd@z Thu Jan 1 00:00:00 1970 From: Masami Hiramatsu Subject: Re: [PATCH RT 1/2 v2] x86: Do not disable preemption in int3 on 32bit Date: Thu, 26 Jan 2012 22:59:58 +0900 Message-ID: <4F215C5E.4090006@hitachi.com> References: <20120125143231.196670014@goodmis.org> <20120125143520.086175333@goodmis.org> <4F211126.1090204@hitachi.com> <1327584811.22710.80.camel@gandalf.stny.rr.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: linux-kernel@vger.kernel.org, linux-rt-users , Thomas Gleixner , Carsten Emde , John Kacur , Ingo Molnar , Andrew Morton , "H. Peter Anvin" , Alexander van Heukelum , Andi Kleen , Oleg Nesterov , Clark Williams , Luis Goncalves To: Steven Rostedt Return-path: Received: from mail9.hitachi.co.jp ([133.145.228.44]:45565 "EHLO mail9.hitachi.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751544Ab2AZOAG (ORCPT ); Thu, 26 Jan 2012 09:00:06 -0500 In-Reply-To: <1327584811.22710.80.camel@gandalf.stny.rr.com> Sender: linux-rt-users-owner@vger.kernel.org List-ID: (2012/01/26 22:33), Steven Rostedt wrote: > On Thu, 2012-01-26 at 17:39 +0900, Masami Hiramatsu wrote: >> (2012/01/25 23:32), Steven Rostedt wrote: >>> Preemption must be disabled before enabling interrupts in do_trap >>> on x86_64 because the stack in use for int3 and debug is a per CPU >>> stack set by th IST. But in 32bit, the stack still belongs to the >>> current task and there is no problem in scheduling out the task. >>> >>> Keep preemption enabled on X86_32 when enabling interrupts for >>> do_trap(). >>> >>> Signed-off-by: Steven Rostedt >> >> Hmm, I think you'd better change caller side, because the >> function itself has "preempt" in its name. I think it can >> easily mislead other people. > > How about if we rename it to > > conditional_preempt_sti/cli() ? > > Then it can be both a conditional preempt as well as interrupts being > disabled. The condition on preempt is "is 32 bits? don't preempt : > preempt"; Better. If the functions are only for signaling, how about using the "signal" in name? :) conditional_sti/cli_for_signal() Thanks, -- Masami HIRAMATSU Software Platform Research Dept. Linux Technology Center Hitachi, Ltd., Yokohama Research Laboratory E-mail: masami.hiramatsu.pt@hitachi.com