Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp38635rdh; Wed, 22 Nov 2023 17:18:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IHrIKUXXtXp6ggAbkm+qJTjdqHA3WK9p49ynC9QqeuyvgVQNV31/LKYVStzl2lakk5CXLIc X-Received: by 2002:a9d:6857:0:b0:6d6:4b8b:baf1 with SMTP id c23-20020a9d6857000000b006d64b8bbaf1mr4558203oto.23.1700702335090; Wed, 22 Nov 2023 17:18:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700702335; cv=none; d=google.com; s=arc-20160816; b=sotxR3HiDNHvQc6KGW8vec4yKVnZdTKB8LjlZN2lHAsErJ4WQ2UCZvl8zIg53YvNsx H8ThNh8c8MH0D1vtCg6j6uONlTaDFCc/53gIKgmhwFC34yWBeEorx6nuk3q4ap9+FCju emAec6/ozX5LeMzx/9NN93EgHO0ieVO2UmACLnjH6IqMX51/j6yNsPodyZrv+J9oB8Ih r4Nxn9apS8Ofd0DNNqlY99YA7zZXy4KvlncTQwrZ2b8WGKT/x9f73PyM5FIFTzz3T83s D8d6BF+FO4ZRkQC89QprNX5yz0ArJ+ssxCgSU6BBfoukN0hCkkNEY8fcNR3jO4Kd/fOX Bccw== 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=HRDfm5lmN9oWHrfQ6RGbONVD1D7o4JaIn9KZ+LQPA/I=; fh=hxPbf9IkRj43Of5P/FbhQu+7ex15vi4aQLxRsqNZaBk=; b=IslnYZbpEOBOtY8xmMvNrWnMv0Xn9VrYnJ9kO5YLVC2oDSaJFwhlAFnatdK8E+oKHE i/itWDQhOhY5/ESgWJpdlwauy2sFUJ7aws0x1m8os41oBvWuGw0IKViCsdbKwjpIgkJ4 juwUbGeVQgkS8e4OQBrUrcsEy6dFz/dRudvnORpnCf2DYvSKFzfPMx6jl8p3sZ7FH3yI e3yR2qw/deBIo0tJvSQlX+2Ccq2VVR2oI1vK+LOZv+47sUsv8zOAXxiZNtSik+NPv6UP Nsm2lINjW4UDiFbD2qoAZdxKE0ukIQIQzTJiEdxfCFxOj6GvpqNyBrz9BJlHRM+2dy7p wP1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=EBCh9vWe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id 83-20020a630056000000b005a1d8816535si283868pga.5.2023.11.22.17.18.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 17:18:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=EBCh9vWe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id AC136807411B; Wed, 22 Nov 2023 17:18:52 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229535AbjKWBS0 (ORCPT + 99 others); Wed, 22 Nov 2023 20:18:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229453AbjKWBSZ (ORCPT ); Wed, 22 Nov 2023 20:18:25 -0500 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDDF192 for ; Wed, 22 Nov 2023 17:18:31 -0800 (PST) Received: by mail-pj1-x1036.google.com with SMTP id 98e67ed59e1d1-2806cbd43b8so347682a91.3 for ; Wed, 22 Nov 2023 17:18:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700702311; x=1701307111; darn=vger.kernel.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=HRDfm5lmN9oWHrfQ6RGbONVD1D7o4JaIn9KZ+LQPA/I=; b=EBCh9vWeg5KLbudqEqzwcN5PKz56TjyTBE5SgTUhf3ognGJRAgZxdhvmI7Rneb0j8y j2TvO4rcYiEunKwHVoDsoabKNRXTt5S7aUp8J+7D6wpBJ1hyZT3u0zhEcZj7BWWEeoiC LL/HPy1sQh10S+oLxJesG0p+zGEa2K+Hw193MCBpymkaDQj02dxyIv4ZkiO1qF/8XFTL iallNQTlKOP7WXgj8nnXbTz3z4snp1t+dDgywZRg8PHJEfhQ+e+eymQan+GPaB/0WGH3 HmG8UzNk80fP9SsbLHPCrJ1ap28m/vf8iCh5YDZVf/BkHaP2FJ+hEz4TJ333RXaOmJH+ NKJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700702311; x=1701307111; 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=HRDfm5lmN9oWHrfQ6RGbONVD1D7o4JaIn9KZ+LQPA/I=; b=h67cOUITBNKYzCLNkpmvMQnk8wwSkEMDHlkCNyeW6TlguNHfGoOmpB+cmYUKweMTE5 1UdikVbErXE+F85qPYqHQub5xiZWryHTbIYH2rQC6JnCd+68e47fgi2dkwu/+K9sYpIe qyNtbx9jdZ1vmeA5Icw/NfPX/UuJprqK+Y0Lz8tDk0BiPvpwXVRPk+SXVpKBuKjD41Sp CcQt1gQMAqsu7j7jFDWGS0bj5HU1mVgmQHbb4pGTBLuUpNnwyLrGkEaoqzzY7ONpoJ13 inPVWA9qiWy15v3bXYxnNnn1lygyVHtF09vk3KQ/JDZ/VJAa4DVEabEZBxn0A8di9vLf 3tJQ== X-Gm-Message-State: AOJu0YxXU1W9X4nuhSsDvg+jdj5hSSYezXnsx1iLVi9iyip/+327RGEv vv3RoLLp8NIMpjq2LEEkDI0= X-Received: by 2002:a17:90b:390e:b0:285:24bd:d8bb with SMTP id ob14-20020a17090b390e00b0028524bdd8bbmr4493019pjb.36.1700702311225; Wed, 22 Nov 2023 17:18:31 -0800 (PST) Received: from archie.me ([103.131.18.64]) by smtp.gmail.com with ESMTPSA id a16-20020a170902ecd000b001cf5d59c739sm44126plh.271.2023.11.22.17.18.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 17:18:30 -0800 (PST) Received: by archie.me (Postfix, from userid 1000) id 4BED510207143; Thu, 23 Nov 2023 08:18:26 +0700 (WIB) Date: Thu, 23 Nov 2023 08:18:26 +0700 From: Bagas Sanjaya To: Chun Ng , Linux Kernel Mailing List Cc: Linux Regressions , Andrew Morton , Linux Memory Management List , "Liam R. Howlett" , Ankita Garg Subject: Re: [REGRESSION]: mmap performance regression starting with k-6.1 Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="oBSe3tCHKA7p0yt4" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 agentk.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 (agentk.vger.email [0.0.0.0]); Wed, 22 Nov 2023 17:18:53 -0800 (PST) --oBSe3tCHKA7p0yt4 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 22, 2023 at 08:03:19PM +0000, Chun Ng wrote: > Hi, >=20 > Recently I observed there is performance regression on system call mmap(.= =2E). I tried both vanilla kernels and Raspberry Pi kernels on a Raspberry = Pi 4 box and the results are pretty consistent among them. >=20 > Bisection showed that the regression starts from k-6.1, and the latest va= nilla k-6.7 is still showing the same regression. >=20 > The test program calls mmap/munmap for a 4K page with MAP_ANON and MAP_PR= IVATE flags, and ftrace is used to measure the time spent on the do_mmap(..= ) call.=C2=A0 Measured time of a sample run with different vanilla kernel v= ersions are: > k-5.10 and k-6.0: ~157us > k-6.1: ~194us > k-6.7: ~214us > Results are pretty consistent across multiple runs with a small percentag= e variance.=C2=A0 Ftrace shows that latency of mmap_region(...) has increas= ed since k-6.1.=C2=A0=C2=A0An application that makes frequent mmap(..) call= s the accumulated extra latency is very noticeable.=20 Did you mean that v6.0 doesn't have this regression? Confused... --=20 An old man doll... just what I always wanted! - Clara --oBSe3tCHKA7p0yt4 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSSYQ6Cy7oyFNCHrUH2uYlJVVFOowUCZV6oXwAKCRD2uYlJVVFO o3C7AP4snmZptoM1ihlFeB/5xpLDHZSoqPN2u/eqYYB2SY8R2gEAi5WXVXAcjnzt x6LuHUALRKh0Ndw9CLixARM1Duf1hws= =zXF1 -----END PGP SIGNATURE----- --oBSe3tCHKA7p0yt4--