From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933905AbbI1NnQ (ORCPT ); Mon, 28 Sep 2015 09:43:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37908 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933393AbbI1NnO (ORCPT ); Mon, 28 Sep 2015 09:43:14 -0400 Message-ID: <560943EF.4040407@redhat.com> Date: Mon, 28 Sep 2015 15:43:11 +0200 From: Denys Vlasenko User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: "H. Peter Anvin" , Ingo Molnar CC: Andy Lutomirski , Borislav Petkov , Brian Gerst , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86/signal: Deinline get_sigframe, save 240 bytes References: <1443443037-22077-1-git-send-email-dvlasenk@redhat.com> <1443443037-22077-4-git-send-email-dvlasenk@redhat.com> <099BA174-FB96-4849-BCD2-807D9A6B9580@zytor.com> In-Reply-To: <099BA174-FB96-4849-BCD2-807D9A6B9580@zytor.com> 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 09/28/2015 02:33 PM, H. Peter Anvin wrote: > This one makes me slightly nervous, because it isn't clear > that these aren't potentially performance sensitive. CALL instruction is not a crime :) It costs about the same as one read-modify-write operation on a memory operand. This function is used in signal delivery code. If performance critical code uses massive numbers of signals, it already has a problem, Unix signals are too inefficient. That's why we have futexes etc... > On September 28, 2015 5:23:57 AM PDT, Denys Vlasenko wrote: >> This function compiles to 277 bytes of machine code and has 4 >> callsites. I must correct myself: there are two callsites, not four. (There are four calls in the source, but two of them are in 32-bit code and two are in 64-bit).