From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752501AbcDZQjO (ORCPT ); Tue, 26 Apr 2016 12:39:14 -0400 Received: from mail.kernel.org ([198.145.29.136]:57677 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751890AbcDZQjM (ORCPT ); Tue, 26 Apr 2016 12:39:12 -0400 From: Andy Lutomirski To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Borislav Petkov , Andy Lutomirski Subject: [PATCH v2 0/5] x86 switch_mm uninlining and IRQ improvements Date: Tue, 26 Apr 2016 09:39:04 -0700 Message-Id: X-Mailer: git-send-email 2.5.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all- I've been playing with context switching lately, and I'm going to start sending out some of the patches that should be mostly self-contained and ready for -tip. Here's a little batch to start improving switch_mm. It uninlines it and makes it run with IRQs off. (AFAICT everyone who's modified it thought it ran with IRQs off, but that's not always the case. I don't know of any bugs that this fixes, but it'll be needed for PCID to avoid introducing really nasty races.) This may also help a bit with FSGSBASE -- not sure yet. It certainly won't hurt. It contains a trivial off-topic ARM patch to avoid breaking the build. Andy Lutomirski (5): arm: Include linux/preempt.h from asm/mmu_context.h sched: Add switch_mm_irqs_off and use it in the scheduler x86/mm: Build arch/x86/mm/tlb.c even on !SMP x86/mm: Uninline switch_mm x86/mm: Turn off IRQs in switch_mm arch/arm/include/asm/mmu_context.h | 1 + arch/x86/include/asm/mmu_context.h | 101 ++------------------------------ arch/x86/mm/Makefile | 3 +- arch/x86/mm/tlb.c | 116 +++++++++++++++++++++++++++++++++++++ include/linux/mmu_context.h | 7 +++ kernel/sched/core.c | 6 +- 6 files changed, 133 insertions(+), 101 deletions(-) -- 2.5.5