Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp75219rdh; Wed, 22 Nov 2023 19:06:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IHFxH1mcRkludwQZ2/vlHBwV/nS+fu+UN2f8aHVuSI6JvwPY3sFoph3nfAd9rbcvpXFM+AK X-Received: by 2002:a17:903:32c1:b0:1cf:6656:69cf with SMTP id i1-20020a17090332c100b001cf665669cfmr4761728plr.21.1700708818222; Wed, 22 Nov 2023 19:06:58 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1700708818; cv=pass; d=google.com; s=arc-20160816; b=m/x7enTXOqarcMucoQ0pkvYCibTt5x3FNuQoSIY+GEs8gqch2bViQzsWlZQ6jL6hg0 K8AK7xCq9uWUkomkRtjHRd4fBQ30egLldQoPRcp+hz+AFBa/hc7exj/q+h8mCgq0FPrk ZuZEavH1apdsRIsPr8/hGfna7cQ+BqsOlB3gFaFD2uviazfzx9+OZaH7ZWuacfLRYImT MktqzJmQyKWoWGKL7nuunRlPpxYFo7vczUKKAYy4kVUYq71FO8NRJl9xnXUwV33103Z0 A0LFXJSTotzQGFiG6+GxiUp4lGqTXJE6juepnPUERzj3Z8cYgE8ioSatIYJ/lL4sG8VG oeDg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :msip_labels:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=n1eAYCy1XdBsins6DYxMxY7TnoJhYfgmSDrbo/2LVeE=; fh=00ieLRtPV8s/UTSghjExxLZ2buP7t+hQedzd4L4w2Xg=; b=zoH8vWS/uYcOTMPVMX07lWqi3jnKjYmuyvQcA2YMUzToIlNeTuWJePyuqOcWW2q7+6 JemFayphegbN54M1mFauew47uNe0aRZuhbNkkZWEgVXp9KgeIukvqxHPCdEARp41mhjg 8rK70Xhm/38pfI/pdOYyIP4LEg4a1KaQTbilTZzfftU6ZQn+o777v8q38o0gi0O6+DJE 0+s4Z4YpqXW6ixQYIWHCMX59oOG8883yId02Bcvd6oNQD0/yRWIlB2rW4pEfK/XLE/fu HkVQpgWGxn5wW1yupNoLgEL/1u09n2Vloa9AJo5G+tYasN7Uac+egBKUAZ6kafbJdi4t qL1A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=Nkgmj4cW; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); 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=REJECT dis=NONE) header.from=nvidia.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id g6-20020a170902c38600b001cf56ff28absi249708plg.539.2023.11.22.19.06.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 19:06:58 -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=@Nvidia.com header.s=selector2 header.b=Nkgmj4cW; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); 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=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id C7E16807D564; Wed, 22 Nov 2023 19:06:55 -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 S232617AbjKWDGk (ORCPT + 99 others); Wed, 22 Nov 2023 22:06:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232584AbjKWDGi (ORCPT ); Wed, 22 Nov 2023 22:06:38 -0500 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D75B4CB for ; Wed, 22 Nov 2023 19:06:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DQv+eTyNc4IRPEsuX5IyHcOO0DOyhq1o6yRRZkvunYc070ER4M2CzFaHZN98xiBTic0motrhvDaTO5KzDU4QN7gBBsGUJQpuww/TA3zNkoFt93X3GHxvdAO3Zg2CGVjbbMfpIirhctDOXr9xeSKMc9/wuVqlaCTdt0hrV+qk5p5/MzpseUWaVEaLR7grTyrMoHGt/dccI+s0oxGDZuF1HQHeuxaxvaAwknUK5fylU+EnlQetmwJyRX9D6d5wFrOBnCWcjZ+DBxDm5v3bQM7o6l9ufTfKlndPYVfbaPhrPLFgigbe28xLJXUqHN0eLflJjlr8WBx9SLox5/y/kMBKhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=n1eAYCy1XdBsins6DYxMxY7TnoJhYfgmSDrbo/2LVeE=; b=J0PSMLjhN5a66ywA4JuhJcowzaOi3d9pUqXfwQK1wDDOsU1k21DqOBdUCEgxcAb89UE/1v8QLAewz996yesm1BURtz+911+g0IouTcnpCXax46V67VohbxAP7C0EdLegd76pVV1YhILGnRasFO0QY3YpdEeorqMNKgB8mkGKOfVBVHe5h8YrFhqEhy5T88CLBe+gTIX06YA3BwL6J/ozDWoonjR8F5kjXDsp0JHI+rYYecJgnxIMZM0a8LpPrvRxhXbPV5ttzypuCpSCbDkbmOIx5vRPrHtk9glckIT3M8Q5b3l14e3UhI+iIFbnv6wAc/uvVisk35U7QcDOjyQpJQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=n1eAYCy1XdBsins6DYxMxY7TnoJhYfgmSDrbo/2LVeE=; b=Nkgmj4cW8RJz4/2Emxtmi0LN/bMo+DH3yyOlCqfuF6pJjQIR2yTzTX4RhUQ4R9wQDSCE9CZwoDU1ORuck6om75QU/eIxnBA7WaQOFK1J/f866UaqTE/oqBvEM0LZjf6LRmN/cizdpz6UZdCjf/WvcBAsSAVFry4koMVmj3lhumJxkcNodcqgSd06XuuoBebVZGFhMZwfWRLU980F13pglShGHEQA6T3nvpxI+NwNsbANd7U7oJbwLRGcxBx8uJkUJ7KAZ41guYcmeOQjixKt6LxSR36RibhM6BUJmOaAb/M6/mAihU4Nzzt+F4hAdfH8FHqYoOBEoO5XKvJK94+fmw== Received: from PH7PR12MB7937.namprd12.prod.outlook.com (2603:10b6:510:270::21) by LV2PR12MB5848.namprd12.prod.outlook.com (2603:10b6:408:173::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.18; Thu, 23 Nov 2023 03:06:42 +0000 Received: from PH7PR12MB7937.namprd12.prod.outlook.com ([fe80::3bcb:91ce:4206:c579]) by PH7PR12MB7937.namprd12.prod.outlook.com ([fe80::3bcb:91ce:4206:c579%6]) with mapi id 15.20.7025.019; Thu, 23 Nov 2023 03:06:42 +0000 From: Chun Ng To: Bagas Sanjaya , 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 Thread-Topic: [REGRESSION]: mmap performance regression starting with k-6.1 Thread-Index: AQHaHPR0v+xZPq8pBkqP4B8aQrrfrbCHHAEAgAAdy+c= Date: Thu, 23 Nov 2023 03:06:42 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH7PR12MB7937:EE_|LV2PR12MB5848:EE_ x-ms-office365-filtering-correlation-id: 31b0531f-98f9-4b44-8f46-08dbebd137d5 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: aR2b+GwPVwubC4XJL9gQcRGveG34prMVYoqe9oC32q146jKYczMRA2IXw33pvVHVHs6fo0TJVPWUqCnZltvah1CYu3/0kP1gIvTOV2lgw4mUgUATgSZW62ZhkYR84p5xZQvlsKedpY5wp4bY9s7X4Lf99FVFyei3ahXOmI3xscTELs92EigAw83p1sj5Fn/t6AK00v3AeBo0q4JOKdiNSRadKcySXBCY/VZzekQLJxnqBaN7F44Q9GVHL8XCZEeDm/SsrLik7VT/aYiqEewQGxC2NxBC5I2KVF8+1ZeC4eCKQoA7elR/+zJfcNMyYABVTC2kFIYezMn+CnDdOkvi3UXjMLnlyKUrwLRZmaBD6puBaN735Dv9qmWnwqGsYyS/oAOkXb7lB9TlxSiUa9bSOIIOQrLGrJhJnowOX+oEieW2B5LdRQiV3l1JmRS3gxFFt3V5Ex9Ldpv9jyMl7sSbjayDbMkF9NPBJJdW4iZUgpD8rj2rE0ngzDN6FOfDM5w9nuHeReHaGXOUmS9ASvHYYSrn6STeqoQMa3mNPprPBWdh4dOamxA5o29aaeSlVfstqImLkdaHFQW68pfVVu+JE17N6/GYTEX9tVqMbB61uJFSjHjG/sInOvUOjqJp13F3 x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH7PR12MB7937.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(366004)(346002)(136003)(39860400002)(376002)(230922051799003)(451199024)(1800799012)(64100799003)(186009)(8676002)(2906002)(86362001)(71200400001)(6506007)(66556008)(7696005)(26005)(53546011)(8936002)(107886003)(9686003)(66446008)(66476007)(316002)(76116006)(64756008)(54906003)(4326008)(110136005)(66946007)(33656002)(91956017)(122000001)(38100700002)(478600001)(83380400001)(5660300002)(38070700009)(52536014)(55016003)(41300700001);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?0mPZzn246qwtT1+TPEWpYO3lR9khPP7TiW2NRuGu/g5H/ejpC4aGPFRLZs?= =?iso-8859-1?Q?HUtwUUrGFJv1YRNmaWiWc8M6b3uy2KN8iN2TuVIUiPe/blkIauqQJa2lRv?= =?iso-8859-1?Q?WwbC2700IZas7Lw5LyL82QQxLwcYxBxWtHqRk2KHLOI30tTb/xjauAvShU?= =?iso-8859-1?Q?QBUYgjIEuVnrT5fChdTF2PU1fpy2ivjWcg0+Ax5h5yUwY8Wi8e4EU7Uuap?= =?iso-8859-1?Q?5KjFpzpxc6lo368SsD3zRe/cEB7TJFeUwkjLbpaelne1d0wxlM8g9o/Rnr?= =?iso-8859-1?Q?ofC/OOWD8VDZL6aVwFLdun5lFCzqsTdmLxK4Qpi8WxqbUKQbWTbC3BPt+7?= =?iso-8859-1?Q?ZOrk2SoJKVmGkuEiDU/5JzQdnIuI/FkQo+NcaxMMflPx2Pols0fPnF8AfE?= =?iso-8859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LvNQs7Yp1bAwKVhpEqvnKBFswadYebNo?= =?iso-8859-1?Q?xIkNiDs4L27pSbdm4gJBt07KPhUwpECcL/Q0J+l4rOUm0ecM4Z1qfAHYrF?= =?iso-8859-1?Q?IwDP7sTVT9maU1iQlJj378shpQBUVXt7wRv7G5DrJR9ffrNCGssWES/wpc?= =?iso-8859-1?Q?yA1Oi2elJT1bK5Bh0jhhQsjBAqVwJpnN+RGe76LeJ2LmJZmEvRt1NgJqHh?= =?iso-8859-1?Q?WuIJdnRiTvcCAtzbseRUIbHhQrIfWHqsDwJzBcwpXC0l243O/eHeKvxExj?= =?iso-8859-1?Q?6aLjmYgdl7o57AbCffDgCHABArwcRSTKuBEsknypVrEeZDBTfBz6sKiy9m?= =?iso-8859-1?Q?r6vhJ2FO5d8Gk=3D?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH7PR12MB7937.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 31b0531f-98f9-4b44-8f46-08dbebd137d5 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Nov 2023 03:06:42.0203 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: qSZ9Lzj82LlqhYZ6BGicjRwOhYMrKtyy6EF2Jgo248Ge72cdunV8KXrzDTZmrHFJuToJgM3OQ1o7AZxyo/XePw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR12MB5848 X-Spam-Status: No, score=-1.3 required=5.0 tests=DKIMWL_WL_HIGH,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 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]); Wed, 22 Nov 2023 19:06:55 -0800 (PST) >> Did you mean that v6.0 doesn't have this regression?=0A= =0A= No, k-6.0 does NOT have this regression. The regression starts from k-6.1.= =0A= =0A= Best,=0A= Chun=0A= =0A= From:=A0Bagas Sanjaya=0A= Sent:=A0Wednesday, November 22, 2023 5:18 PM=0A= To:=A0Chun Ng; Linux Kernel Mailing List=0A= Cc:=A0Linux Regressions; Andrew Morton; Linux Memory Management List; Liam = R. Howlett; Ankita Garg=0A= Subject:=A0Re: [REGRESSION]: mmap performance regression starting with k-6.= 1=0A= =0A= =0A= On Wed, Nov 22, 2023 at 08:03:19PM +0000, Chun Ng wrote:=0A= =0A= > Hi,=0A= =0A= >=0A= =0A= > Recently I observed there is performance regression on system call mmap(.= .). I tried both vanilla kernels and Raspberry Pi kernels on a Raspberry Pi= 4 box and the results are pretty consistent among them.=0A= =0A= >=0A= =0A= > Bisection showed that the regression starts from k-6.1, and the latest va= nilla k-6.7 is still showing the same regression.=0A= =0A= >=0A= =0A= > 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.=A0 Measured time of a sample run with different vanilla kernel vers= ions are:=0A= =0A= > k-5.10 and k-6.0: ~157us=0A= =0A= > k-6.1: ~194us=0A= =0A= > k-6.7: ~214us=0A= =0A= > Results are pretty consistent across multiple runs with a small percentag= e variance.=A0 Ftrace shows that latency of mmap_region(...) has increased = since k-6.1.=A0=A0An application that makes frequent mmap(..) calls the acc= umulated extra latency is very noticeable.=0A= =0A= =0A= =0A= Did you mean that v6.0 doesn't have this regression?=0A= =0A= =0A= =0A= Confused...=0A= =0A= =0A= =0A= --=0A= =0A= An old man doll... just what I always wanted! - Clara=