Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4175237imu; Fri, 30 Nov 2018 12:19:48 -0800 (PST) X-Google-Smtp-Source: AFSGD/W3Bq0gIQgRJ3lFndhYSLncEo8YG7AGcxOWaiP+sdycI7x5b40EsJBGmgiRs6I6znwercKP X-Received: by 2002:a62:1c06:: with SMTP id c6mr6821020pfc.157.1543609188112; Fri, 30 Nov 2018 12:19:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543609188; cv=none; d=google.com; s=arc-20160816; b=GTAM/YjTjZZOdhuQBzA0/9z+9vLnMII3ux5pWwGFX409n1aTPFA1YJtj9NPEFZPzsB 0kyKP9DDJsxkfKW1DQkVQLIaVy6ygsNhFjxpEX+99sO1M1YSxSntWuuZSwHle9GAmU/h RyqZhjW+2kPgnfXdqIJ6r5YIPf39DAAkNCzAZlejo2B6UeZeWkBBkm6PerFtLbRdh3Sh CIYM4mKHrTm/YnDMh65c3+3xMN6zmx3bwd/WJG9rovxXglLEzQJmtIE3f292BwhA6QOj NH64R5+I3ybW7l/ghDAaSEAMC/lxfFX6Zre6a9uK0qaHYe9SpNd5Wq6ZYoiiqMwdo4pF EMYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=jQQ2sI9GwimTidL8QbcWhjjxkK4N/34aQhSLtQXA1Jo=; b=sfWm46Ef+2EfQBVftEzpS2fwpXzdHcHbqqxFpU+y/+yCzC0owNdnfyoanh9P+VEX4r L5FE7KicsX8AB44X+UcVMypyv8c9fXRY0Tl5p5b59aPz5nmsp9X5TcBsBXzCCs8rf2uJ MMg1wugPaF0foAMnapmoaH4dOi6f216HBJNUZYjGTJ3S5mXx1bZVZzwYE08VGelthqu5 ydOeqwQa8qNpjhG8uTo2BJXUxR5W5Cn0aDTZfufDYw4Q+AnL/RXkktNfVgueSlH2elz4 NSaQrhOIpDvmO473AQ2st04F+nYis5U3Njpws8DlMqugDJPCDsbtLECAF3eZhaTDfMjC C2Gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vLPCRkCJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b10si6442308plz.233.2018.11.30.12.19.30; Fri, 30 Nov 2018 12:19:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vLPCRkCJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726659AbeLAH3O (ORCPT + 99 others); Sat, 1 Dec 2018 02:29:14 -0500 Received: from mail.kernel.org ([198.145.29.99]:50790 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725993AbeLAH3N (ORCPT ); Sat, 1 Dec 2018 02:29:13 -0500 Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EAB472148E for ; Fri, 30 Nov 2018 20:18:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543609127; bh=Cs7BDISB1ieiLt7d4jp2Ven9syRA+nggJ3jKZ0LD1UI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=vLPCRkCJkMYS20CuLF4O9fD4Fh3MwXOgfombV2e1c8HcM6JNTd+MfWVx3wChPbda6 JdOmsVGlJ0gRcp/La9M8jXnAfR48rAO6dX/q1TAgLiTSbMaw2rBspUIGemOUMy7MZj j9lXoLoEhlE9M1r0PfKwlaoYqFG7tNT1DCYTUofs= Received: by mail-wr1-f41.google.com with SMTP id c14so6469358wrr.0 for ; Fri, 30 Nov 2018 12:18:46 -0800 (PST) X-Gm-Message-State: AA+aEWbePzVdFNUOgFtbWGSJksgxBH/FAlN8eAKkPOsNhjvJuFQso9As w2KW0pzj6tz7ah8Q1YohVRWNzX9Cpe78yYTqmz2aOg== X-Received: by 2002:adf:f0c5:: with SMTP id x5mr5887210wro.77.1543609125274; Fri, 30 Nov 2018 12:18:45 -0800 (PST) MIME-Version: 1.0 References: <20181129124404.2fe55dd0@gandalf.local.home> <20181129125857.75c55b96@gandalf.local.home> <20181129134725.6d86ade6@gandalf.local.home> <20181129202452.56f4j2wdct6qbaqo@treble> <20181130183917.hxmti5josgq4clti@treble> In-Reply-To: From: Andy Lutomirski Date: Fri, 30 Nov 2018 12:18:33 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 4/4] x86/static_call: Add inline static call implementation for x86-64 To: Linus Torvalds Cc: Josh Poimboeuf , Andrew Lutomirski , Steven Rostedt , Peter Zijlstra , X86 ML , LKML , Ard Biesheuvel , Ingo Molnar , Thomas Gleixner , Masami Hiramatsu , Jason Baron , Jiri Kosina , David Laight , Borislav Petkov , julia@ni.com, jeyu@kernel.org, "H. Peter Anvin" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 30, 2018 at 11:51 AM Linus Torvalds wrote: > > On Fri, Nov 30, 2018 at 10:39 AM Josh Poimboeuf wrote: > > > > AFAICT, all the other proposed options seem to have major issues. > > I still absolutely detest this patch, and in fact it got worse from > the test of the config variable. > > Honestly, the entry code being legible and simple is more important > than the extra cycle from branching to a trampoline for static calls. > > Just don't do the inline case if it causes this much confusion. With my entry maintainer hat on, I don't mind it so much, although the implementation needs some work. The #ifdef should just go away, and there should be another sanity check in the sanity check section. Or we could replace that IPI with x86's bona fide serialize-all-cpus primitive and then we can just retry instead of emulating. It's a piece of cake -- we just trigger an SMI :) /me runs away. --Andy