Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp893158rdb; Wed, 6 Dec 2023 03:04:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IGMBtaphk3wk0zdSU4wmzoRMn1jIR38GTZXbva/f9xbK0op+tznVruUXYR6OndT0Udof3gW X-Received: by 2002:a05:6a21:3299:b0:18f:ce60:ceeb with SMTP id yt25-20020a056a21329900b0018fce60ceebmr1121400pzb.23.1701860672629; Wed, 06 Dec 2023 03:04:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701860672; cv=none; d=google.com; s=arc-20160816; b=ZM5JSo4wi6ZkU699f0Z/bRJIwdxvmiQhv6u2v+D6SrQX9QT3tvS422NvayHoq8vfR8 +xQiwlhyh4MW2JITfpUURn/Wdw+BPmszsS6VcyV+rWvHlPMVkUjn0Sdmkn3WR79otlxA O7alrFsh2DmiImi4cEdYaLsKIvcL8w/Hj9NYYskFuY5QJte1a0uKglJNl02TQNWLuyWl KmCuYoAa8riZMq8pSLKkKf3T4guKbcQNUlQF6MNkmZ6c+73UQynsA8ouWFAycepmxytU XPBd5+JHPadhSgIbQ2QJ2qxf4+0Br6A/bEYZmeVEDslt4MmI0B98WFxKoXkegx7ITtEe zxUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=kSYlxXqYrJTRv96VW6+MysBZoWRii4OIQnWqLMrQnEI=; fh=CsEwHi32JTG+AUn4FnY04djmf1yjRrIOCAviw6WcYo0=; b=WffdR26uiRjdhbzpk+Fn9MQ+44cm8mCPigpCiZK/yQQs856d5ewkGXHWjGXts4sEgp WQU6THLp27ssW7w50BKiYgLS+A56iq4cv4+07RroEJzAPowOq0ZsEMkZl8lPP3YVK38a h1kA/qRAC4UHdXMilr/ZQBvB03c9tf8c3/ug+18hID4XQ81q3HCBzupsqsma1u6NMoA4 TtchAHuPwVdTVvEhefsT9B/Z3EEGWL3qauZzdBj/Ttv9g2BWhBdS/UaLmrF260d7rgQc d6TaE0+yJ43kmSdPvHXfk7GLZ+bqeo6MMfEWtL3lsP9iTiB+gcqmg/xKIfzRbr1rACD2 /wHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=EfzA3J4P; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id a7-20020a655c87000000b005bd66bfc253si6541049pgt.148.2023.12.06.03.04.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 03:04:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=EfzA3J4P; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 0576A80B26BD; Wed, 6 Dec 2023 03:04:30 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377967AbjLFLEO (ORCPT + 99 others); Wed, 6 Dec 2023 06:04:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378062AbjLFLED (ORCPT ); Wed, 6 Dec 2023 06:04:03 -0500 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D125E268B for ; Wed, 6 Dec 2023 03:02:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=kSYlxXqYrJTRv96VW6+MysBZoWRii4OIQnWqLMrQnEI=; b=EfzA3J4PnDms+Gx8LZcjukNC7/ oQZLXyNarq3qXGfcgjjOZzkualSeOBaFPk8IgRkjZoe/E3v+mQBIOeLXStF57ll4f0fPVfOqTJtNt NtpZvpvXIzmurgYmsQUL/RnnpXG1q4goNXia9WJixL4/FxeeQZ5Itj2TFv2qqv8qwP1kTEDxIrX2+ TIXrgHCWsFNYs+iVegAtKu3U0QJ/ywTH6j8kUQilB59n5J5f3+LHOl4jImRhO5ozCZ9tvvUbeCYfC 9WuLw0a70tMcxOL2FhsGJCu53PBk31Tj+gUZc5ZagLvpT8lh0Z957m6VGTYRSyYVB6roROUw7PhNS iiCQFIYg==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1rApfG-00596Y-2O; Wed, 06 Dec 2023 11:02:03 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 321C0300451; Wed, 6 Dec 2023 12:02:02 +0100 (CET) Date: Wed, 6 Dec 2023 12:02:02 +0100 From: Peter Zijlstra To: Sven Schnelle Cc: Thomas Gleixner , Andy Lutomirski , linux-kernel@vger.kernel.org, Heiko Carstens Subject: Re: [PATCH 0/3] entry: inline syscall enter/exit functions Message-ID: <20231206110202.GD30174@noisy.programming.kicks-ass.net> References: <20231205133015.752543-1-svens@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231205133015.752543-1-svens@linux.ibm.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 06 Dec 2023 03:04:30 -0800 (PST) On Tue, Dec 05, 2023 at 02:30:12PM +0100, Sven Schnelle wrote: > Hi List, > > looking into the performance of syscall entry/exit after s390 switched > to generic entry showed that there's quite some overhead calling some > of the entry/exit work functions even when there's nothing to do. > This patchset moves the entry and exit function to entry-common.h, so > non inlined code gets only called when there is some work pending. So per that logic you wouldn't need to inline exit_to_user_mode_loop() for example, that's only called when there is a EXIT_TO_USER_MODE_WORK bit set. That is, I'm just being pedantic here and pointing out that your justification doesn't cover the extent of the changes. > I wrote a small program that just issues invalid syscalls in a loop. > On an s390 machine, this results in the following numbers: > > without this series: > > # ./syscall 1000000000 > runtime: 94.886581s / per-syscall 9.488658e-08s > > with this series: > > ./syscall 1000000000 > runtime: 84.732391s / per-syscall 8.473239e-08s > > so the time required for one syscall dropped from 94.8ns to > 84.7ns, which is a drop of about 11%. That is obviously very nice, and I don't immediately see anything wrong with moving the lot to header based inlines. Thomas?