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


Groups > linux.kernel > #1567477

Re: [PATCH 5/7] x86/fpu: Change fpu->fpregs_active users to fpu->fpstate_active

From Rik van Riel <riel@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH 5/7] x86/fpu: Change fpu->fpregs_active users to fpu->fpstate_active
Date 2017-01-26 15:50 +0100
Message-ID <t3Tx8-9b-13@gated-at.bofh.it> (permalink)
References <t3QpA-6Hl-9@gated-at.bofh.it> <t3QpA-6Hl-19@gated-at.bofh.it>
Organization Red Hat, Inc

Show all headers | View raw


On Thu, 2017-01-26 at 12:26 +0100, Ingo Molnar wrote:
> We want to simplify the FPU state machine by eliminating fpu-
> >fpregs_active,
> and we can do that because the two state flags (::fpregs_active and
> ::fpstate_active) are set essentially together.
> 
> The old lazy FPU switching code used to make a distinction - but
> there's
> no lazy switching code anymore, we always switch in an 'eager'
> fashion.

I've been working for a while now to fix that for
KVM VCPU threads.

Currently when we switch to a VCPU thread, we first
load that thread's userspace FPU context, and then
soon after we save that, and load the guest side FPU
context.

When a VCPU thread goes idle, we also go through
two FPU context transitions.

In order to skip the unnecessary FPU context switches
for VCPU threads, I have been relying on separate
fpstate_active and fpregs_active states.

Do you have any ideas on how I could implement that
kind of change without separate fpstate_active and
fpregs_active states?

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


Thread

[PATCH 5/7] x86/fpu: Change fpu->fpregs_active users to fpu->fpstate_active Ingo Molnar <mingo@kernel.org> - 2017-01-26 12:30 +0100
  Re: [PATCH 5/7] x86/fpu: Change fpu->fpregs_active users to  fpu->fpstate_active Rik van Riel <riel@redhat.com> - 2017-01-26 15:50 +0100
    Re: [PATCH 5/7] x86/fpu: Change fpu->fpregs_active users to  fpu->fpstate_active Ingo Molnar <mingo@kernel.org> - 2017-01-26 16:20 +0100
      Re: [PATCH 5/7] x86/fpu: Change fpu->fpregs_active users to  fpu->fpstate_active Rik van Riel <riel@redhat.com> - 2017-01-26 17:30 +0100
        Re: [PATCH 5/7] x86/fpu: Change fpu->fpregs_active users to  fpu->fpstate_active Ingo Molnar <mingo@kernel.org> - 2017-01-26 17:30 +0100
          Re: [PATCH 5/7] x86/fpu: Change fpu->fpregs_active users to fpu->fpstate_active Andy Lutomirski <luto@amacapital.net> - 2017-01-26 18:10 +0100
            Re: [PATCH 5/7] x86/fpu: Change fpu->fpregs_active users to  fpu->fpstate_active Rik van Riel <riel@redhat.com> - 2017-01-26 19:10 +0100

csiph-web