From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleg Nesterov Subject: Re: [PATCH RT 2/2 v4] preempt-rt/x86: Delay calling signals in int3 Date: Fri, 3 Feb 2012 19:40:16 +0100 Message-ID: <20120203184016.GA10413@redhat.com> References: <20120203182853.547078531@goodmis.org> <20120203183041.427463295@goodmis.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-kernel@vger.kernel.org, linux-rt-users , Thomas Gleixner , Carsten Emde , John Kacur , Masami Hiramatsu , Ingo Molnar , Andrew Morton , "H. Peter Anvin" , Alexander van Heukelum , Andi Kleen , Clark Williams , Luis Goncalves , stable-rt@vger.kernel.org To: Steven Rostedt Return-path: Received: from mx1.redhat.com ([209.132.183.28]:37239 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757449Ab2BCSrS (ORCPT ); Fri, 3 Feb 2012 13:47:18 -0500 Content-Disposition: inline In-Reply-To: <20120203183041.427463295@goodmis.org> Sender: linux-rt-users-owner@vger.kernel.org List-ID: Steven, I guess I need to actually read the patch before asking the questions... I'll try later, but On 02/03, Steven Rostedt wrote: > > --- linux-rt.git.orig/arch/x86/kernel/entry_64.S > +++ linux-rt.git/arch/x86/kernel/entry_64.S > @@ -1391,6 +1391,14 @@ paranoid_userspace: > paranoid_schedule: > TRACE_IRQS_ON > ENABLE_INTERRUPTS(CLBR_ANY) > +#ifdef CONFIG_PREEMPT_RT_FULL > + GET_THREAD_INFO(%rcx) > + movl TI_flags(%rcx),%ebx > + testl $_TIF_FORCE_SIG_TRAP,%ebx > + jz paranoid_do_schedule > + call do_force_sig_trap > +paranoid_do_schedule: > +#endif Stupid question. Do we really need to send the signal from here? Why force_sig(rt => T) can't set TIF_NOTIFY_RESUME instead? Then we can change do_notify_resume() to check TIF_FORCE_SIG_TRAP. And perhaps we can even avoid the new TIF_FORCE_SIG_TRAP, we could check task->stored_info_set. In fact I feel this can be simplified even more, but I am not sure. Oleg.