[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151208185608.GA3004@gmail.com>
Date: Tue, 8 Dec 2015 19:56:08 +0100
From: Ingo Molnar <mingo@...nel.org>
To: Brian Gerst <brgerst@...il.com>
Cc: Andy Lutomirski <luto@...capital.net>,
Andy Lutomirski <luto@...nel.org>,
the arch/x86 maintainers <x86@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Borislav Petkov <bp@...en8.de>,
Frédéric Weisbecker <fweisbec@...il.com>,
Denys Vlasenko <dvlasenk@...hat.com>,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH 07/12] x86/entry/64: Always run ptregs-using syscalls on
the slow path
* Brian Gerst <brgerst@...il.com> 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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists