Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752601AbcJAUuR (ORCPT ); Sat, 1 Oct 2016 16:50:17 -0400 Received: from shelob.surriel.com ([74.92.59.67]:50138 "EHLO shelob.surriel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752418AbcJAUuI (ORCPT ); Sat, 1 Oct 2016 16:50:08 -0400 From: riel@redhat.com To: linux-kernel@vger.kernel.org Cc: x86@kernel.org, tglx@linutronix.de, pbonzini@redhat.com, mingo@redhat.com, luto@kernel.org, hpa@zytor.com, dave.hansen@linux.intel.com, bp@suse.de Subject: [PATCH RFC 0/5] x86,fpu: make FPU context switching much lazier Date: Sat, 1 Oct 2016 16:31:30 -0400 Message-Id: <1475353895-22175-1-git-send-email-riel@redhat.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 787 Lines: 16 This series is an attempt at making the x86 FPU context switching code much lazier. By only reloading the FPU context when a task switches to user mode, we can avoid switching FPU context for tasks that spin in kernel mode, and avoid reloading the FPU context for tasks that get interrupted by a kernel thread or briefly go idle. It also allows us to skip restoring the userspace FPU context when exiting a KVM guest. This series is still BROKEN. The first 3 patches seem to work fine in my tests (but should not, due to missing signal path code), while the 4th test makes it easier to trigger bugs. I am posting this to ask about obvious issues people may see, ideas on what direction I should take this series in, and to avoid code conflicts with Andy's plans wrt. lazy fpu mode.