Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752000AbbLHS4P (ORCPT ); Tue, 8 Dec 2015 13:56:15 -0500 Received: from mail-wm0-f53.google.com ([74.125.82.53]:36845 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751818AbbLHS4N (ORCPT ); Tue, 8 Dec 2015 13:56:13 -0500 Date: Tue, 8 Dec 2015 19:56:08 +0100 From: Ingo Molnar To: Brian Gerst Cc: Andy Lutomirski , Andy Lutomirski , the arch/x86 maintainers , Linux Kernel Mailing List , Borislav Petkov , =?iso-8859-1?Q?Fr=E9d=E9ric?= Weisbecker , Denys Vlasenko , Linus Torvalds Subject: Re: [PATCH 07/12] x86/entry/64: Always run ptregs-using syscalls on the slow path Message-ID: <20151208185608.GA3004@gmail.com> References: <2ff015fa6989c6a8907c73636f5f5cb99402f6c3.1449522077.git.luto@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Content-Length: 1260 Lines: 35 * Brian Gerst wrote: > > We could adjust it a bit and check whether we're in C land (by checking rsp > > for ts) and jump into the slow path if we aren't, but I'm not sure this is a > > huge win. It does save some rodata space by avoiding duplicating the table. > > The syscall table is huge. 545*8 bytes, over a full page. Duplicating it for > just a few different entries is wasteful. Note that what matters more is cache footprint, not pure size: 1K of RAM overhead for something as fundamental as system calls is trivial cost. So the questions to ask are along these lines: - what is the typical locality of access (do syscall numbers cluster in time and space) - how frequently would the two tables be accessed (is one accessed less frequently than the other?) - subsequently how does the effective cache footprint change with the duplication? it might still end up not being worth it - but it's not the RAM cost that is the main factor IMHO. Thanks, Ingo -- 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/