From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756017AbbFOVnM (ORCPT ); Mon, 15 Jun 2015 17:43:12 -0400 Received: from terminus.zytor.com ([198.137.202.10]:50541 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750858AbbFOVnI (ORCPT ); Mon, 15 Jun 2015 17:43:08 -0400 Message-ID: <557F46CF.8040003@zytor.com> Date: Mon, 15 Jun 2015 14:42:39 -0700 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Linus Torvalds , Andy Lutomirski CC: Denys Vlasenko , Borislav Petkov , X86 ML , "linux-kernel@vger.kernel.org" Subject: Re: For your amusement: slightly faster syscalls References: In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/15/2015 02:30 PM, Linus Torvalds wrote: > > On Jun 12, 2015 2:09 PM, "Andy Lutomirski" > wrote: >> >> Caveat emptor: it also disables SMP. > > OK, I don't think it's interesting in that form. > > For small cpu counts, I guess we could have per-cpu syscall entry points > (unless the syscall entry msr is shared across hyperthreading? Some > msr's are per thread, others per core, AFAIK), and it could actually > work that way. > > But I'm not sure the three cycles is worth the worry and the complexity. > We discussed the per-cpu syscall entry point, and the issue at hand is that it is very hard to do that without with fairly high probability touch another cache line and quite possibly another page (and hence a TLB entry.) -hpa