From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755019AbbFRKTz (ORCPT ); Thu, 18 Jun 2015 06:19:55 -0400 Received: from mail-wi0-f176.google.com ([209.85.212.176]:35657 "EHLO mail-wi0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753977AbbFRKTr (ORCPT ); Thu, 18 Jun 2015 06:19:47 -0400 Date: Thu, 18 Jun 2015 12:19:43 +0200 From: Ingo Molnar To: Andy Lutomirski Cc: Andy Lutomirski , X86 ML , "linux-kernel@vger.kernel.org" , =?iso-8859-1?Q?Fr=E9d=E9ric?= Weisbecker , Rik van Riel , Oleg Nesterov , Denys Vlasenko , Borislav Petkov , Kees Cook , Brian Gerst , Linus Torvalds Subject: Re: [RFC/INCOMPLETE 08/13] x86/entry/64: Migrate 64-bit syscalls to new exit hooks Message-ID: <20150618101943.GA6952@gmail.com> References: <0ee44a97cf6ffd9a948425b27fa8d48fa271c440.1434485184.git.luto@kernel.org> <20150617100009.GA5673@gmail.com> <20150617100242.GA6015@gmail.com> <20150618101709.GB6149@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150618101709.GB6149@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Ingo Molnar wrote: > > * Andy Lutomirski wrote: > > > >> Any reason why irq state tracking cannot be done in C as well, like the > > >> rest of the irq state tracking code? > > > > > > Never mind, I see you've done exactly that in patch #12. > > > > There are still some TRACE_IRQS_ON, LOCKDEP_SYS_EXIT, and such scattered > > throughout the asm. it's plausible that even more of that could be moved to > > C. > > > > We could also benchmark and find out how bad it would be if we just always > > filled pt_regs in completely in syscalls. If the performance hit isn't enough > > to matter, then we could potentially move the entire syscall path except > > pt_regs setup and sysret/iret into three C functions. > > The thing is, I'd not be against simplifying pt_regs handling even if it slows > down things a tiny bit. If anyone wants to reintroduce that complexity we'll see > how it looks like in isolation, done cleanly. ... and I suspect the reduction of entry points will allow the compiler to do a better job - so some of the overhead might be won back. So I'd say we try this approach and complicate it back in the future only if the numbers warrant it. Thanks, Ingo