Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1270678

Re: [PATCH v3 5/5] x86/entry/64: Bypass enter_from_user_mode on non-context-tracking boots

From Frederic Weisbecker <fweisbec@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3 5/5] x86/entry/64: Bypass enter_from_user_mode on non-context-tracking boots
Date 2015-11-17 00:00 +0100
Message-ID <qvAUG-4Yp-25@gated-at.bofh.it> (permalink)
References <qu78l-5oc-3@gated-at.bofh.it> <qu78l-5oc-1@gated-at.bofh.it> <quosy-88l-9@gated-at.bofh.it> <qvxtM-2U5-29@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Nov 16, 2015 at 11:10:55AM -0800, Andy Lutomirski wrote:
> On Nov 13, 2015 7:26 AM, "Frederic Weisbecker" <fweisbec@gmail.com> wrote:
> >
> > On Thu, Nov 12, 2015 at 12:59:04PM -0800, Andy Lutomirski wrote:
> > > On CONFIG_CONTEXT_TRACKING kernels that have context tracking
> > > disabled at runtime (which includes most distro kernels), we still
> > > have the overhead of a call to enter_from_user_mode in interrupt and
> > > exception entries.
> > >
> > > If jump labels are available, this uses the jump label
> > > infrastructure to skip the call.
> >
> > Looks good. But why are we still calling context tracking code on IRQs at all?
> 
> Same reasons as before:
> 
> 1. This way the IRQ exit path is almost completely shared with all the
> other exit paths.

I'm all for consolidation in general. Unless it brings bad middle states.

If I knew before that I would have to argue endlessly in order to protest against
these context tracking changes, I would have NACK'ed the x86 consolidation rework in
the state it was while it got merged.

> 
> 2. It combines the checks for which context we were in with what CPL
> we entered from.
> 
> Part 2 should be complete across the whole x86 kernel soon once the
> 64-bit syscall code gets fixed up.
> 
> We should get rid of the duplication in the irq entry hooks.  Want to
> help with that?

Which one? The duplication against irq_enter() and irq_exit()?

I think that irq_exit() should be moved to the IRQ very end and perform the
final signal/schedule/preempt_schedule_irq() loop. But it requires a bit of
rework on all archs in order to do that. This could be done iteratively though.

> Presumably we should do the massive remote polling speedup to the nohz code,

Hmm, I don't get what you mean here.

> and we should also teach enter_from_user_mode to transition directly to IRQ state as
> appropriate.  Then irq_enter can be much faster.

I don't get what you mean here either. You mean calling irq_enter() from enter_from_user_mode()?

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v3 5/5] x86/entry/64: Bypass enter_from_user_mode on  non-context-tracking boots Andy Lutomirski <luto@amacapital.net> - 2015-11-16 20:20 +0100
  Re: [PATCH v3 5/5] x86/entry/64: Bypass enter_from_user_mode on  non-context-tracking boots Frederic Weisbecker <fweisbec@gmail.com> - 2015-11-17 00:00 +0100
    Re: [PATCH v3 5/5] x86/entry/64: Bypass enter_from_user_mode on  non-context-tracking boots Andy Lutomirski <luto@amacapital.net> - 2015-11-17 01:00 +0100
      Re: [PATCH v3 5/5] x86/entry/64: Bypass enter_from_user_mode on  non-context-tracking boots Frederic Weisbecker <fweisbec@gmail.com> - 2015-11-19 02:00 +0100

csiph-web