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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2645C61D85 for ; Thu, 23 Nov 2023 05:07:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4055D6B0505; Thu, 23 Nov 2023 00:07:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3B49D6B0506; Thu, 23 Nov 2023 00:07:48 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 27C9F6B0508; Thu, 23 Nov 2023 00:07:48 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 158E26B0505 for ; Thu, 23 Nov 2023 00:07:48 -0500 (EST) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id E4DB080F82 for ; Thu, 23 Nov 2023 05:07:47 +0000 (UTC) X-FDA: 81488036574.03.6C3F3D1 Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) by imf25.hostedemail.com (Postfix) with ESMTP id 1816FA001B for ; Thu, 23 Nov 2023 05:07:45 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=J2yCq3Co; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf25.hostedemail.com: domain of bagasdotme@gmail.com designates 209.85.210.178 as permitted sender) smtp.mailfrom=bagasdotme@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1700716066; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=yY1sQyyb1uhz9MfrFnoGi87QF1jG7op21D45vYKRwfA=; b=VOhQlMbl+rn0IDb+7yBQVLopk3da60m6iaJcltH5yqctXrp7o6WIWuBPLWytuZAkpAaFEx ZACJBDtky8anQIMKSRajT2cyzQx+HJYrTWq+ZcJsM05p10JBfnfdbqY0Txc9rn3Hf3TiW2 96SXISZEUY2YAWTT2IoN6Q8luCYMSvw= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=J2yCq3Co; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf25.hostedemail.com: domain of bagasdotme@gmail.com designates 209.85.210.178 as permitted sender) smtp.mailfrom=bagasdotme@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1700716066; a=rsa-sha256; cv=none; b=0pDi2XlgGNrCVOixkPvQ8kuYZKRqHdlfG+eOfEo40Re+XCL5aY5cBS5MkxgSBTD0vZ6k9j KsnF3rnJQ9QMblawl1c+RHEB9NGBYoXHIu6IZoeGtm429in2JMwPshPyHS7KefbyWY8mFZ 57CWzv9H1DEl7W5e25ZEtgkDijgKiRE= Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-6c4cf0aea06so551425b3a.0 for ; Wed, 22 Nov 2023 21:07:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700716065; x=1701320865; darn=kvack.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=yY1sQyyb1uhz9MfrFnoGi87QF1jG7op21D45vYKRwfA=; b=J2yCq3Coc2kONzUrRe+dW0UoyvKkL7Gt5ZKEFdqcM6TwMWxPQ3RBwVkcAb45Jo4hUN 1e8ycsdwtIbskjiT9eJt1/GPvndGFbyOpFqgJ/M9QgY3+fDIv1hIKFMAtJP3uGxXGHT9 79loHfF5FNj1PIEZXs5jDnHxhPBnoldVCb1BapqiOWDnp9J1lWjE7b1cf6DRazoelrvW s3B5w6VZ46AYnZnFu+BPDcioVwjGC4UOdzD0HOjWk44c1RA0cQeREFZ+ATmJ/Qx7RueE 2oQ8GruB3lPUVfgazphjsC54CzgEUaFZgPprbN7TXLfafukiPTl00NZWym8n4bviHZw5 Bkvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700716065; x=1701320865; 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=yY1sQyyb1uhz9MfrFnoGi87QF1jG7op21D45vYKRwfA=; b=q8r4E/JqdkAXha6EiK1PUMHV5AbgPaJutEk7jWLdr6z//lHLF1atCyMrZZFyuSspKt C2bi56TrggP+ZPXxLG+Hkl0k6mebdolKbh0iqoVpTZNAQtI6ctKvYuZ5YnGzOz6JZyZ3 Bk1w2ecU28BtVZ2PPYbM8WCI2J69hm9+TDp22RDmAT7TjpXg1yJ13/E3exeyDaOyYaH3 T2epsK/H+ViN1/QOQ7M6sWW80KI+tM0/m59ltCHImQVZRyr7lHiV6OMBTeYzQeUwp/Ns G98USPZb0FIwYtY/SkuMtMZMEplAaxIvTj703AMHVeZnL1XXJPxFWPNBQC0kCfW/Md8p eJpg== X-Gm-Message-State: AOJu0YzQp41uZId0mCrFLB+CBRiXCPbCboIcH2E7ozu/y35/S2AkeMgA tyuYTt46679xBRwSJeM99L/UcU94aB3MuQ== X-Google-Smtp-Source: AGHT+IFz/3lXGWiwZTSBkr7qB201/vdd5nMWHrqRynwT5rXxDA/xIdUgmfyt7Xq43WHYUvn3g18qgA== X-Received: by 2002:a05:6a21:3008:b0:187:a119:908f with SMTP id yd8-20020a056a21300800b00187a119908fmr4115371pzb.3.1700716064558; Wed, 22 Nov 2023 21:07:44 -0800 (PST) Received: from archie.me ([103.131.18.64]) by smtp.gmail.com with ESMTPSA id i15-20020a17090a2acf00b002839679c23dsm432002pjg.13.2023.11.22.21.07.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 21:07:44 -0800 (PST) Received: by archie.me (Postfix, from userid 1000) id CE5B010207143; Thu, 23 Nov 2023 12:07:40 +0700 (WIB) Date: Thu, 23 Nov 2023 12:07:40 +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="KIdW2yF7ZM5mmI7P" Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 1816FA001B X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: 7mn6rij3pyi46f6wgh5jytw9mhocc7mx X-HE-Tag: 1700716065-992847 X-HE-Meta: U2FsdGVkX1+LHBDhZIDlgbak8Zd9KzajzgVkoESoUtnqsRGEAx1QKCu85dEq3KaqxXzqzv8WG4glpoxyHIioS8qJ0hqzBE6TL3XLlXE9AJFidjnlW4JnkttN02R0wDNQGDqwBE8aXM0GNfXvhZZXb9ivznX1F9dqbt9ejOLn9zvs7/Is1zZ3ShulmBuU8rZBIbhZC6TZlkScTjYdFxrAO4nh8z7uFTALjebTeLA2LeNVLUh7ChUrN90FJty7PGCJ3OPPOM2cAvEj8Y4WLpOE08lZcH8diVijatxJjoubozQhbZkKXo2V7UeZu98EbZiIuv0647WylmBpy78uoLQ4HW2+CbKdWS6lSkzfuFSpT7IKo/d8HhqLDxPBx3oXJyFV2yZk8e8L67S1069P82qGotZkcJJw2BbHQB0C1vo5Dvtaq5HJ9a7HkwiG6rYB6xjKw04Bq+9Ojo39ukZx8YGG8RrAMwCJfa3kBU02JCxOq2Dgcuw0IkLtSRGFNfiPilEQ4RPN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, spamicity=0.000394, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: --KIdW2yF7ZM5mmI7P 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 >=20 > Please find the ftrace results and kernel config files in this folder: > https://drive.google.com/drive/folders/1qy8YTBqxu8Gdbs7IigYbSd4FXldId5sd?= usp=3Ddrive_link >=20 > The test program can be found in here: > https://drive.google.com/file/d/1tG6_BbQMCHwfKebvAIAg_xqbM_lpPcuM/view?us= p=3Dsharing >=20 > Info on the testing environment: > cpufreq_governor: performance > Test machine: Raspberry Pi 4, 8GB DDR > SCHED_FIFO with priority 99 for running the test program >=20 > Vanilla kernels are not tainted. However on k-6.0 and k-6.7, I have to pa= tch the drivers/clk/bcm/clk-raspberrypi.c file with the version in Raspberr= y Pi kernel tree for the CPU frequency governor to work. >=20 The next step is to find the commit that introduces your regression with `git bisect`. If you haven't done so, see Documentation/admin-guide/bug-bisect.rst for instructions. Anyway, I'm adding this regression to regzbot: #regzbot ^introduced: v6.0..v6.1 Thanks. --=20 An old man doll... just what I always wanted! - Clara --KIdW2yF7ZM5mmI7P Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSSYQ6Cy7oyFNCHrUH2uYlJVVFOowUCZV7eGAAKCRD2uYlJVVFO o72FAQCK5rdafR/mKJWt3KzyR6K08xDUXWyyIuqjKnddfzjV1gD/RNJ2SAAIHKWN re/3qbV0011KdIQjaBsiuk0g/iTkaAA= =/6zc -----END PGP SIGNATURE----- --KIdW2yF7ZM5mmI7P--