public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@tv-sign.ru>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>, george anzinger <george@mvista.com>
Subject: Re: [patch] big IRQ lock removal, 2.5.27-D9
Date: Tue, 23 Jul 2002 01:19:44 +0400	[thread overview]
Message-ID: <3D3C76F0.307C6C3@tv-sign.ru> (raw)
In-Reply-To: Pine.LNX.4.44.0207221650140.11103-100000@localhost.localdomain

Hello.

George Anzinger wrote:
>
> > then preempt_stop (cli) can be killed in entry.S:ret_from_intr()
>
> Also at least some of the trap code returns with interrupts enabled.

Then linux already have a bug - ret_from_exception: bypasses
ret_from_intr:. But as far as i can see, it does not - all users of
ret_from_exception: do preempt_stop. And so it can be shifted to
ret_from_exception.

I beleive none of the traps need current_thread_info() in regs->ebx,
so GET_THREAD_INFO(%ebx) can be killed in error_code:,
common_interrupt:,
and BUILD_INTERRUPT().

Not sure it is right time to such minor cleanups, but...
Patch on top of remove-irqlock-2.5.27-E0:

--- arch/i386/kernel/entry.S.orig	Mon Jul 22 23:44:41 2002
+++ arch/i386/kernel/entry.S	Tue Jul 23 00:04:02 2002
@@ -185,8 +185,10 @@
 
 	# userspace resumption stub bypassing syscall exit tracing
 	ALIGN
-ret_from_intr:
 ret_from_exception:
+	preempt_stop
+ret_from_intr:
+	GET_THREAD_INFO(%ebx)
 	movl EFLAGS(%esp), %eax		# mix EFLAGS and CS
 	movb CS(%esp), %al
 	testl $(VM_MASK | 3), %eax
@@ -333,14 +335,12 @@
 common_interrupt:
 	SAVE_ALL
 	call do_IRQ
-	GET_THREAD_INFO(%ebx)
 	jmp ret_from_intr
 
 #define BUILD_INTERRUPT(name, nr)	\
 ENTRY(name)				\
 	pushl $nr-256;			\
 	SAVE_ALL			\
-	GET_THREAD_INFO(%ebx);		\
 	call smp_/**/name;	\
 	jmp ret_from_intr;
 
@@ -400,10 +400,8 @@
 	movl $(__KERNEL_DS), %edx
 	movl %edx, %ds
 	movl %edx, %es
-	GET_THREAD_INFO(%ebx)
 	call *%edi
 	addl $8, %esp
-	preempt_stop
 	jmp ret_from_exception
 
 ENTRY(coprocessor_error)
@@ -430,7 +428,6 @@
 	pushl $0			# temporary storage for ORIG_EIP
 	call math_emulate
 	addl $4, %esp
-	preempt_stop
 	jmp ret_from_exception
 
 ENTRY(debug)

Oleg.

  parent reply	other threads:[~2002-07-22 21:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-22 14:45 [announce, patch, RFC] "big IRQ lock" removal, IRQ cleanups Oleg Nesterov
2002-07-22 14:58 ` [patch] big IRQ lock removal, 2.5.27-D9 Ingo Molnar
2002-07-22 17:25   ` Oleg Nesterov
2002-07-22 21:19   ` Oleg Nesterov [this message]
2002-07-23  9:18     ` Ingo Molnar
2002-07-22 18:03 ` [announce, patch, RFC] "big IRQ lock" removal, IRQ cleanups george anzinger
2002-07-22 18:04   ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3D3C76F0.307C6C3@tv-sign.ru \
    --to=oleg@tv-sign.ru \
    --cc=george@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox