Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5836924rdb; Thu, 14 Dec 2023 00:24:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IFzwviGHpnlx4yujcSJWdY6bkVdmF2LXlmO5LK/0Zhc0xB3wwmZHGgjlxKFXdb5ch3u6/op X-Received: by 2002:a05:6358:e49e:b0:170:5499:9a6a with SMTP id by30-20020a056358e49e00b0017054999a6amr10045435rwb.49.1702542296886; Thu, 14 Dec 2023 00:24:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702542296; cv=none; d=google.com; s=arc-20160816; b=wATatDa22aq+XRT0OlHH2RUEeP7g679ExORbocObEkl8pyHoeZFBQ3ZWOODwAIkkN8 yHlSKHJhJQXs+VmFFH0WtSQr1VUkBSVLOWoZPrMGcgLThXoQgd+ec6XXJ90YQ9jR7YIK lu8JATtVt5fkmWYSqzmMKPsE88Yu0pWWdzIxmfZpwwfkUNwjakmrTfA5v69R5EjD+ihL d+fOR4ArqbHR/T2bcqSurmaXNOGRSpl8Y3ghBmqY1LYIxTAkP01G8TWr7IhJFXc0qa90 1WiMj2CcaBKIKdp/Ui7yJ3B38bxuM6dF/a4PFLUO4LgC3YG/k6mPuZYxbss4f9Pg79ac Skaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:dkim-signature; bh=EAS5XJXk6U+QgcDEY10r7th110a8HILa0q+4HGlwfCo=; fh=oh2LjeZQVjDE/i5OgR3lMkDVGbHCuluMBmPtvjf7tqY=; b=Rohzh+EDlxF45dNXiYb/QuINgUf6XyNrLQaR5E1Alntyn3blaVQyj2O6sCdaAks20P xH5gJ9mOtUBWca9QnB5+cQ2Mpktv1XSZZQIjqiLuf/4/2m/Q6NdaOKZLCq80KU1fKn2a 72KRTUvceOiIc9yu+CBhM4vE72ar9biRplrH1jOYRf/hgq/ChlVI0mR9xqKJCb7zEdAz fkqsT7Snw7TA9AzzH14OWRYOFcH1t2FWbQeCJRkFPqLLiDd8DGyLewLUA07GBbQOl6Xh wuMAWzA7QenVl7zP/f5V/dldLtvw/CnGBQOUkNdZjyLtvB9vrOSvY4VWSDYaSN8NZGEG cLDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=qjgJo2qG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id t20-20020a17090ad51400b0028af280a709si1706310pju.96.2023.12.14.00.24.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 00:24:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=qjgJo2qG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 0BBD382D74C2; Thu, 14 Dec 2023 00:24:54 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229769AbjLNIYi (ORCPT + 99 others); Thu, 14 Dec 2023 03:24:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbjLNIYh (ORCPT ); Thu, 14 Dec 2023 03:24:37 -0500 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DCCACF for ; Thu, 14 Dec 2023 00:24:43 -0800 (PST) Received: from pps.filterd (m0353722.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3BE7cHrP023154; Thu, 14 Dec 2023 08:24:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : in-reply-to : references : date : message-id : mime-version : content-type; s=pp1; bh=EAS5XJXk6U+QgcDEY10r7th110a8HILa0q+4HGlwfCo=; b=qjgJo2qGMYfZnD5sJIzlGkyGBj4KvaicGOU0/O8SvHlKCqbyxNQ+dvhhVfp0MNHSnuj7 PdUIAnYoj4xa67QE4FhwcDCldKyy9Bxm76e6rJDmBb45yxwL3svhJOEsaIysQ3+v4Nvv H/PNRJb7Gz6O7PYlc2HwfouFCJmYCpWjo0t0QRjTEq9X68sVNe69d+n4jFhpxPuU6oAV YLESGMCQepgnldFb6DAFDbQK+ZBwPIETYmoMPygMxltTMhcwBQWVWpEPPUGCFhHVb1E4 Txh7chD1Jbs9mRQCQOx0KCHgyPtDb2W0PaeOHwjEi11qj21U/pZemNYvVvQvRDeRBjpB Xw== Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3uywg217n1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Dec 2023 08:24:20 +0000 Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1]) by ppma22.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3BE6Vvgd028201; Thu, 14 Dec 2023 08:24:19 GMT Received: from smtprelay03.fra02v.mail.ibm.com ([9.218.2.224]) by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3uw2xyy96p-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Dec 2023 08:24:19 +0000 Received: from smtpav03.fra02v.mail.ibm.com (smtpav03.fra02v.mail.ibm.com [10.20.54.102]) by smtprelay03.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3BE8OHE916188106 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 Dec 2023 08:24:17 GMT Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6D4F020043; Thu, 14 Dec 2023 08:24:17 +0000 (GMT) Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4F9A120040; Thu, 14 Dec 2023 08:24:17 +0000 (GMT) Received: from tuxmaker.linux.ibm.com (unknown [9.152.85.9]) by smtpav03.fra02v.mail.ibm.com (Postfix) with ESMTPS; Thu, 14 Dec 2023 08:24:17 +0000 (GMT) From: Sven Schnelle To: Thomas Gleixner Cc: Peter Zijlstra , Andy Lutomirski , linux-kernel@vger.kernel.org, Heiko Carstens Subject: Re: [PATCH 0/3] entry: inline syscall enter/exit functions In-Reply-To: <20231206110202.GD30174@noisy.programming.kicks-ass.net> (Peter Zijlstra's message of "Wed, 6 Dec 2023 12:02:02 +0100") References: <20231205133015.752543-1-svens@linux.ibm.com> <20231206110202.GD30174@noisy.programming.kicks-ass.net> Date: Thu, 14 Dec 2023 09:24:17 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: jonJla6tE9aTRM7ALYpsyF2zWpz1vyyz X-Proofpoint-GUID: jonJla6tE9aTRM7ALYpsyF2zWpz1vyyz X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-14_04,2023-12-13_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 adultscore=0 mlxscore=0 priorityscore=1501 mlxlogscore=468 clxscore=1015 suspectscore=0 malwarescore=0 impostorscore=0 bulkscore=0 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2312140053 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, 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 howler.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 (howler.vger.email [0.0.0.0]); Thu, 14 Dec 2023 00:24:54 -0800 (PST) Peter Zijlstra writes: > 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? Thomas, any opinion on this change?