From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 92686C369D5 for ; Mon, 28 Apr 2025 21:54:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=K3EtYyjf4gdK8U1ALU9JtsKtV1HrvZ6nEjneljQazYI=; b=U2mUZeQ19mRWGT H01zMQx+6Z8tasvbgHSGAEDLdrt9lX1fK7nnlrdxZz4OGZrgevwGA+UHtCGojQnWOLEztY6CTH8/h r0TQNZHWEpQxgeOKtrEgiD281/OGK5Mk5qUA1Iwu2fsQcmMnNtAi2gC+Ou4HZ8u3eHuFegHn3sNiB I6Iw9KHTAVyA1A+Un0+Da+Ysx/HCS/V1SxPz22zwgYKBAao2HHtxza0kp72KPzkKuh1UjmW3I35Bw I7bsQ7ZO/stvHdy1kz5DfbFih38vwelLcscp+t287mJ7U+eBY+P+Bejpay5UcZjbpW1wAXpIAWx9U h8tFk4mrHol8P4F327qg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1u9WR5-00000007fh0-1l19; Mon, 28 Apr 2025 21:54:47 +0000 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1u9WR2-00000007fgO-2bLY for linux-riscv@lists.infradead.org; Mon, 28 Apr 2025 21:54:46 +0000 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-736c277331eso6027506b3a.1 for ; Mon, 28 Apr 2025 14:54:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1745877283; x=1746482083; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=7PrFUrYVebeKySS/v6ZqS0K5DEgZAx8oNo9TFzTB1i0=; b=rK3kz/vw6tmPlciF6D0aI6yDkXRm9YJt3D+1TGDEhh3JaRCXgfE8Kea7GcXwJxRqL8 cMX75W9P14E+fLqwyeGGIIxzB5uAsYLJVTEvg5l4WYhQVFxs30Q7vu6BDlAlajp606za zoxDF/5Wf6wrWrXUX4I9tRWqFr7LmWLA/RzvUPmAc1NP/rhVAWrS75QJy4HVRzD8nZhf x8enSLONJl551UT6vn1IgLZcoraE/JfN2yi2MFif3PD0CAflvQ/a9Qwq/mP3x2YenGsp SYR+VHXNiJFZuCMVtrerKLM2xTOuY8JmWfwNwOQFV1PFeMtCLZkctqy4dcWSWQU/fd2N yFyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745877283; x=1746482083; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=7PrFUrYVebeKySS/v6ZqS0K5DEgZAx8oNo9TFzTB1i0=; b=FlSdrO6jBElL311D91kgFEPEUoCcWRF6uNT3GSw043X8Eh1pMsWJj+JgYEZEm3m48B 4VBxIYnTXgtUaG12geG4P7fhExJbR2NBlfkBgn3GNoS062RLKqmTplnmL2MvMj+iaoM/ uEJlVpLTxjXdL+wP1BtZuhJF88/aO/MYTYVdyVdaTb9hkemtG4QWZMwVDorblGXJZvmK l5vau04XJAzzU5Rwdw9jMRhnAib8CAg4hCelszmPjO78bj76gYDCYS/J685isrDWHPdi TKv24hjZiel6lbaNTHTD56mEfSr3j4nopXVNF1nJdqvh43470+CBfe76bxfE+aTBp+7g EsiA== X-Forwarded-Encrypted: i=1; AJvYcCXgspv6m/d2CktCPjL30pk5DstL3ywgXDi5+NmPAM2nc1fICafz7JyJStqKFFhjDRU3iapCWQ/QN5im0Q==@lists.infradead.org X-Gm-Message-State: AOJu0YzLZkoXHmt4IViEUJertGixvHlI2w8hd+7ODyZC4cbzXdLYYeOS 3aBZVP1IfUZKoybDuT4+xsJ+QNoxHjlxbig4cduxjixVIEQQJJBtnSeH1P20pyw= X-Gm-Gg: ASbGncseehOaLMT9vr2rhmu1my32wHWNBE8n97GcqwjJC/8jR+d6aA8hMwTmvQ5UR8W BonUr9G/ca72Ok0TBs8Ib3KRnM0WZnlr6wtr9siGmj0Yc/8f02WSGfZFTKuizHocp1mToL0yN+4 ScUkwCL9DwA9v87FhUGUvNs3gr4tS8TJ5KPuC+ufNO7bns9aJXHe/YHKlrL4jmK7B7Op0eWjgBD 6yolbixA/T4GqetV4Q41Z6bD4VLZZxikVBHh+F5APueb2CqJS6AaKlHzn9bn2uHJfrRnHmyYdix vpwr2xFDQnAxwJwm/3rcHS0lovSbxca3ll4f X-Google-Smtp-Source: AGHT+IGWT3F9rzHKTZtgpify0Emfhlu0qposGjyGuLHhHiqFNXMP110/wH5dDuLcBSTkm/pZT1KRBQ== X-Received: by 2002:a05:6a20:9f44:b0:1fe:61a4:7210 with SMTP id adf61e73a8af0-2094f0854e6mr1162679637.2.1745877283395; Mon, 28 Apr 2025 14:54:43 -0700 (PDT) Received: from ghost ([2601:647:6700:64d0:5842:f05a:498b:82d0]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15faded547sm7735083a12.69.2025.04.28.14.54.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Apr 2025 14:54:42 -0700 (PDT) Date: Mon, 28 Apr 2025 14:54:40 -0700 From: Charlie Jenkins To: Thomas Gleixner Cc: Paul Walmsley , Palmer Dabbelt , Huacai Chen , WANG Xuerui , Peter Zijlstra , Andy Lutomirski , Alexandre Ghiti , Arnd Bergmann , Albert Ou , Alexandre Ghiti , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, loongarch@lists.linux.dev Subject: Re: [PATCH v6 0/4] entry: Move ret_from_fork() to C and inline syscall_exit_to_user_mode() Message-ID: References: <20250320-riscv_optimize_entry-v6-0-63e187e26041@rivosinc.com> <87frj613kz.ffs@tglx> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87frj613kz.ffs@tglx> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250428_145444_926144_F39A508A X-CRM114-Status: GOOD ( 16.56 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Fri, Mar 21, 2025 at 10:22:36PM +0100, Thomas Gleixner wrote: > On Thu, Mar 20 2025 at 10:29, Charlie Jenkins wrote: > > Similar to commit 221a164035fd ("entry: Move > > syscall_enter_from_user_mode() to header file"), move > > syscall_exit_to_user_mode() to the header file as well. > > > > Testing was done with the byte-unixbench [1] syscall benchmark (which > > calls getpid) and QEMU. On riscv I measured a 7.09246% improvement, on > > x86 a 2.98843% improvement, on loongarch a 6.07954% improvement, and on > > s390 a 11.1328% improvement. > > > > The Intel bot also reported "kernel test robot noticed a 1.9% > > improvement of stress-ng.seek.ops_per_sec" [2] > > > > Since this is on QEMU, I know these numbers are not perfect, but they > > show a trend of general improvement across all architectures that use > > the generic entry code. > > This looks sane now. I've bookmarked it as post-merge window material. Has this been applied somewhere? - Charlie > > Thanks, > > tglx _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4DD0D1E3DD3 for ; Mon, 28 Apr 2025 21:54:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745877287; cv=none; b=MoLZk0k8XlLoh6PJzf2W9voCk86ASscgPdS1fcHnWLyBf2rtpXYprarWkROf9s7goPjxkyHlFFeF5TnIeDVPCgu39iCOY54ZwEWzyeAVo/fMvjno+icted03JOtNBehJVh3SQTurGdDS9aYrS01ulFVxUnUuuo7zzzXnvIoIIBk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745877287; c=relaxed/simple; bh=I0D+24NhqEjNNCwy2eb6utOoFDrJBSYh2LEtPIvzec0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=SUuE0sNWdv7XB52FKt9/2vV2HHEZbvtRrO7dTH60FLpyj6lDiAxvxo7wmwehJk6noeTsKafbOB42LTE3p8h8jQgMOiBRIHUYgrrxQodIjIhekiq6uJRh9CN1opNcqbhazs4vZ1fbGrKS5trAPEtBIS8w3fWQwQ2+lqJoq6dclQ0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=J1ZT+11W; arc=none smtp.client-ip=209.85.210.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="J1ZT+11W" Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-736dd9c4b40so5613322b3a.0 for ; Mon, 28 Apr 2025 14:54:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1745877283; x=1746482083; darn=lists.linux.dev; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=7PrFUrYVebeKySS/v6ZqS0K5DEgZAx8oNo9TFzTB1i0=; b=J1ZT+11W7aberooP9333CccZoNoP82SjtQxHXrA9CMILNnIXATMKqiQVwHlp7HhWrz Zrq6UDTOnIOMpUcDZ9BfrIIff2D9uyk+CEQLE7Gn+sDhmesdcPf0XWhJjOl88oEun4Ym 1Wv/3MclnRk8Mn65jn5YgOO4or13baguay2XLhgllb8wOnae1YubdN05C34Q63bluyxG mwv5UwseLLYlV6kgnZPYtFc8VHq4bYzKOr7j+MSnfrEk62tASWuEuDiq2X+dsGWUjl/K a8l+vmsHRtOP4beeFqBhNU+l9VAAC+V9CkJILctT8O7l/bY9zpM3IYFb4tMogFTU1dFB FcjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745877283; x=1746482083; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=7PrFUrYVebeKySS/v6ZqS0K5DEgZAx8oNo9TFzTB1i0=; b=kUdCuYjStfT+uvxIql2fGB1aUB4LlmVN1ejdiiLrsJov1gBCTj0qD6BBRSsX9zvIin GSZWFRIVIZw+ij+MjPQ2RuNMpfORD6WjG8bxtJ3ok1v+ch/sUhva7VAAk9GFuZ0nimmQ MRiNOM2W99z//FsbuAkummy7ZBEYMNEFCKgZP+fLGRqFIEiBd7FMEEctAeVi7vDidXsw jmQsfe21kGfjrj1oZFIWIAaoczGwUCsdEONo7+6bdO1rMXdJcrOtP3yVjS/vKwmS5KMi 9OxXjAugqEgxXzVnUAUE9SrexWaJkoY5Bi3AZEDMtEjc0e9K0ZV7I98Flk1B8yBjttYP vADA== X-Forwarded-Encrypted: i=1; AJvYcCWTahR9p7pXwPJaiCsalcWlbfYpWR6dEgxCXceT6nS4jFY5pLLJnD9VORGF6+qICaDTGDE1nG5p6tM=@lists.linux.dev X-Gm-Message-State: AOJu0YzPQOZLIpsmDLIaBaUrDMNEW98CMgy6UHUIXQ0HXanP99mXRTcr TaPCBmg+TIQACtpInZ+McOKp4nSES8JZvNjBL8IjB7EVVvtJbbSpkPHaO1Jcsjs= X-Gm-Gg: ASbGnctu2DfTcTeAB4eH7Mn4oLrZfg2lRdDsTu8zIY+ikzBh3mG7NJU6bBoRon1jPnD x+sL7bOOC8n4GUT7ixjMbs0YYvLWCe870eZVtMtC8BfFMktJ7xwRX/dkAOc8mLvjyO7b/6cus3p qt6KorPWunVx108YalMzxuzOIaq0ES3cMwdepdt20l4O6jtoD43xt9g8HHr5QFaq4UmGtOS0fwq Vg3DVsLsIUzT8SMzlWPlKxDTeqgMdZK5610Sjx1mT1wphRt3AiOLztF62nzQ3uS0RjsxBJCwZKH jTZhC9ct2FfGZrEoicpFQTTxFYPeaSKcJJ4S X-Google-Smtp-Source: AGHT+IGWT3F9rzHKTZtgpify0Emfhlu0qposGjyGuLHhHiqFNXMP110/wH5dDuLcBSTkm/pZT1KRBQ== X-Received: by 2002:a05:6a20:9f44:b0:1fe:61a4:7210 with SMTP id adf61e73a8af0-2094f0854e6mr1162679637.2.1745877283395; Mon, 28 Apr 2025 14:54:43 -0700 (PDT) Received: from ghost ([2601:647:6700:64d0:5842:f05a:498b:82d0]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b15faded547sm7735083a12.69.2025.04.28.14.54.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Apr 2025 14:54:42 -0700 (PDT) Date: Mon, 28 Apr 2025 14:54:40 -0700 From: Charlie Jenkins To: Thomas Gleixner Cc: Paul Walmsley , Palmer Dabbelt , Huacai Chen , WANG Xuerui , Peter Zijlstra , Andy Lutomirski , Alexandre Ghiti , Arnd Bergmann , Albert Ou , Alexandre Ghiti , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, loongarch@lists.linux.dev Subject: Re: [PATCH v6 0/4] entry: Move ret_from_fork() to C and inline syscall_exit_to_user_mode() Message-ID: References: <20250320-riscv_optimize_entry-v6-0-63e187e26041@rivosinc.com> <87frj613kz.ffs@tglx> Precedence: bulk X-Mailing-List: loongarch@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87frj613kz.ffs@tglx> On Fri, Mar 21, 2025 at 10:22:36PM +0100, Thomas Gleixner wrote: > On Thu, Mar 20 2025 at 10:29, Charlie Jenkins wrote: > > Similar to commit 221a164035fd ("entry: Move > > syscall_enter_from_user_mode() to header file"), move > > syscall_exit_to_user_mode() to the header file as well. > > > > Testing was done with the byte-unixbench [1] syscall benchmark (which > > calls getpid) and QEMU. On riscv I measured a 7.09246% improvement, on > > x86 a 2.98843% improvement, on loongarch a 6.07954% improvement, and on > > s390 a 11.1328% improvement. > > > > The Intel bot also reported "kernel test robot noticed a 1.9% > > improvement of stress-ng.seek.ops_per_sec" [2] > > > > Since this is on QEMU, I know these numbers are not perfect, but they > > show a trend of general improvement across all architectures that use > > the generic entry code. > > This looks sane now. I've bookmarked it as post-merge window material. Has this been applied somewhere? - Charlie > > Thanks, > > tglx