Re: [PATCH] enable interrupts in user path of page fault.
- From: Steven Rostedt <rostedt@xxxxxxxxxxx>
- Date: Thu, 07 Jun 2007 22:06:46 -0400
On Thu, 2007-06-07 at 18:58 -0700, Andrew Morton wrote:
On Wed, 06 Jun 2007 23:34:04 -0400
Interrupts got disabled here because do_page_fault() is an
interrupt-disabling trap, yes?
Correct.
The patch looks reasonable to me: a slight reduction in interrupt-off
latency when really weird things are happening.
The patch also breaks things, I think: if userspace is running with
interrupts disabled and tries to access kernel memory it will presently
whizz through the kernel without ever enabling interrupts. With this
change, the kernel will now enable interrupts, which is presumably not what
the application wanted.
I didn't realize that userspace was allowed to run with interrupts
disabled. If this becomes a problem, we can add the same check that's
above where do_page_fault does enable interrupts, but is skipped because
the faulting address was above PAGE_OFFSET.
ie. (i386)
if (regs->eflags & (X86_EFLAGS_IF|VM_MASK))
local_irq_enable();
However it's surely already the case that most pagefaults will go and
enable interrupts on this process anyway, so no big loss there. I'd expect
the kernel to spit piles of might_sleep() warnings when all this happens, so
maybe it just doesn't happen for some reason.
Actually it does on the RT kernel. Hence why I found it ;-)
-- Steve
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH] enable interrupts in user path of page fault.
- From: Linus Torvalds
- Re: [PATCH] enable interrupts in user path of page fault.
- References:
- [PATCH] enable interrupts in user path of page fault.
- From: Steven Rostedt
- Re: [PATCH] enable interrupts in user path of page fault.
- From: Andrew Morton
- [PATCH] enable interrupts in user path of page fault.
- Prev by Date: Re: [PATCH] intel-rng: Undo mess made by an 80 column extremist
- Next by Date: Re: [PATCH] intel-rng: Undo mess made by an 80 column extremist
- Previous by thread: Re: [PATCH] enable interrupts in user path of page fault.
- Next by thread: Re: [PATCH] enable interrupts in user path of page fault.
- Index(es):
Relevant Pages
|