Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753367AbbKPTLQ (ORCPT ); Mon, 16 Nov 2015 14:11:16 -0500 Received: from mail-ob0-f175.google.com ([209.85.214.175]:33681 "EHLO mail-ob0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750781AbbKPTLP (ORCPT ); Mon, 16 Nov 2015 14:11:15 -0500 MIME-Version: 1.0 In-Reply-To: <20151113152612.GA14397@lerouge> References: <73ee804fff48cd8c66b65b724f9f728a11a8c686.1447361906.git.luto@kernel.org> <20151113152612.GA14397@lerouge> From: Andy Lutomirski Date: Mon, 16 Nov 2015 11:10:55 -0800 Message-ID: Subject: Re: [PATCH v3 5/5] x86/entry/64: Bypass enter_from_user_mode on non-context-tracking boots To: Frederic Weisbecker Cc: Borislav Petkov , Brian Gerst , "linux-kernel@vger.kernel.org" , X86 ML , Peter Zijlstra , Linus Torvalds Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1418 Lines: 36 On Nov 13, 2015 7:26 AM, "Frederic Weisbecker" 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. 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? Presumably we should do the massive remote polling speedup to the nohz code, and we should also teach enter_from_user_mode to transition directly to IRQ state as appropriate. Then irq_enter can be much faster. --Andy -- 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/