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 59ABEC433EF for ; Fri, 4 Mar 2022 01:10:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5E4178D0002; Thu, 3 Mar 2022 20:10:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5928B8D0001; Thu, 3 Mar 2022 20:10:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 481688D0002; Thu, 3 Mar 2022 20:10:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.27]) by kanga.kvack.org (Postfix) with ESMTP id 38D918D0001 for ; Thu, 3 Mar 2022 20:10:18 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id D9770218B9 for ; Fri, 4 Mar 2022 01:04:45 +0000 (UTC) X-FDA: 79204908930.13.9140718 Received: from mail-ot1-f51.google.com (mail-ot1-f51.google.com [209.85.210.51]) by imf01.hostedemail.com (Postfix) with ESMTP id C3C1140382 for ; Fri, 4 Mar 2022 00:28:52 +0000 (UTC) Received: by mail-ot1-f51.google.com with SMTP id s1-20020a056830148100b005acfdcb1f4bso6092241otq.4 for ; Thu, 03 Mar 2022 16:28:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudflare.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HSBGHRdQkkPnSN65RQnx/+q5RCLg2EjDzyPO/Va84bo=; b=aA3v6oRxPvQk7jCI3UJsFV966CxO30MFSAJIXqXP2Ws/dy65N2sbrPap7HrOmzU2ce xAfd6Ul+Vi/9fyScb9PFzPeR6tk78R+Rrx5s2M1ZEeSm1Y4qNsvcVjhAUXUpoVEyxY74 tnH4ReYJVdf5uHD+SoTH0AbpWC5O7GzAwCnOk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HSBGHRdQkkPnSN65RQnx/+q5RCLg2EjDzyPO/Va84bo=; b=QcAdCc6BkW5luAloZnDpj1QCJwxQVkr3iWTwo1whNgTxx0XG02U3RpIYPTi7G4iK89 8jmrhDbWRDOPUCXixdz+gPyEQn0AhrEwa4K9A2YY6jQ7LqBUZ6nhUVxcnLrQdz2lePHa pDxIEFZupFKx4jrTsdAmH8hGigrLi3YBVx8uNE/En+djScZOtxwGeaulYpfsrSL60a3D Jl05QDMa6FozZ96tK2Qwihnm0WDbuvC4gOqZlBIcnNeLRDu7G8HwSy4F/OY02ah747VL GbTa3SZ4++pie+ZptfomfmCtNFPO0drPzmwt+fzGVd0EKLF3E1KMOxylwjQuH/SqwzUV 5wqg== X-Gm-Message-State: AOAM5338qyq+0+IbgHddgU/naQoPU6uIpsFliCTEP4GVpc6Rm7Zn6j1h QGiJYjQGuuiDO4DUzhnfmuBWkum7p8J67c77UMInG2D8/dX6HQ== X-Google-Smtp-Source: ABdhPJz+dXLdeaj0Di7aB6g0LiSkl3ssQTNwuhaPk/p/phDqnxhaOS/XjWzrouHDJKb43zJicOaBv1IbqSNjLTNmN0g= X-Received: by 2002:a81:74d4:0:b0:2dc:5a9f:c830 with SMTP id p203-20020a8174d4000000b002dc5a9fc830mr975005ywc.32.1646353290850; Thu, 03 Mar 2022 16:21:30 -0800 (PST) MIME-Version: 1.0 References: <20220225180345.GD12037@blackbody.suse.cz> <20220228230949.xrmy6j2glxsoffko@google.com> <20220302025022.nnmpwxmkqed2icck@google.com> <20220303023504.gux47rd5wvnikymh@google.com> In-Reply-To: <20220303023504.gux47rd5wvnikymh@google.com> From: Ivan Babrou Date: Thu, 3 Mar 2022 16:21:20 -0800 Message-ID: Subject: Re: Regression in workingset_refault latency on 5.15 To: Shakeel Butt Cc: =?UTF-8?Q?Michal_Koutn=C3=BD?= , Daniel Dao , kernel-team , Linux MM , Johannes Weiner , Roman Gushchin , Feng Tang , Michal Hocko , Hillf Danton , Andrew Morton , Linus Torvalds Content-Type: text/plain; charset="UTF-8" X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: C3C1140382 X-Stat-Signature: ngpqmipudzx69guknfddpr3p3u4tm7o5 Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=cloudflare.com header.s=google header.b=aA3v6oRx; spf=none (imf01.hostedemail.com: domain of ivan@cloudflare.com has no SPF policy when checking 209.85.210.51) smtp.mailfrom=ivan@cloudflare.com; dmarc=pass (policy=reject) header.from=cloudflare.com X-HE-Tag: 1646353732-812738 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Mar 2, 2022 at 6:35 PM Shakeel Butt wrote: > > On Wed, Mar 02, 2022 at 02:33:41PM -0800, Ivan Babrou wrote: > > On Tue, Mar 1, 2022 at 7:40 PM Ivan Babrou wrote: > [...] > > Please try the following patch: * Linux 5.10.101: $ sudo /usr/share/bcc/tools/funclatency -d 60 workingset_refault Tracing 1 functions for "workingset_refault"... Hit Ctrl-C to end. nsecs : count distribution 0 -> 1 : 0 | | 2 -> 3 : 0 | | 4 -> 7 : 0 | | 8 -> 15 : 0 | | 16 -> 31 : 0 | | 32 -> 63 : 0 | | 64 -> 127 : 0 | | 128 -> 255 : 0 | | 256 -> 511 : 5496 |****************************************| 512 -> 1023 : 3161 |*********************** | 1024 -> 2047 : 1059 |******* | 2048 -> 4095 : 3149 |********************** | 4096 -> 8191 : 2074 |*************** | 8192 -> 16383 : 90 | | 16384 -> 32767 : 43 | | 32768 -> 65535 : 44 | | 65536 -> 131071 : 12 | | 131072 -> 262143 : 3 | | 262144 -> 524287 : 1 | | avg = 2144 nsecs, total: 32453571 nsecs, count: 15132 * Linux 5.15.25: $ sudo /usr/share/bcc/tools/funclatency -d 60 workingset_refault Tracing 1 functions for "workingset_refault"... Hit Ctrl-C to end. nsecs : count distribution 0 -> 1 : 0 | | 2 -> 3 : 0 | | 4 -> 7 : 0 | | 8 -> 15 : 0 | | 16 -> 31 : 0 | | 32 -> 63 : 0 | | 64 -> 127 : 0 | | 128 -> 255 : 0 | | 256 -> 511 : 132411 |****************************************| 512 -> 1023 : 45547 |************* | 1024 -> 2047 : 5869 |* | 2048 -> 4095 : 10553 |*** | 4096 -> 8191 : 5297 |* | 8192 -> 16383 : 455 | | 16384 -> 32767 : 214 | | 32768 -> 65535 : 175 | | 65536 -> 131071 : 50 | | 131072 -> 262143 : 6 | | 262144 -> 524287 : 2 | | 524288 -> 1048575 : 80 | | 1048576 -> 2097151 : 3228 | | 2097152 -> 4194303 : 13514 |**** | 4194304 -> 8388607 : 792 | | 8388608 -> 16777215 : 1 | | avg = 221955 nsecs, total: 48429632352 nsecs, count: 218195 * Linux 5.15.25 + delayed flush: $ sudo /usr/share/bcc/tools/funclatency -d 60 workingset_refault Tracing 1 functions for "workingset_refault"... Hit Ctrl-C to end. nsecs : count distribution 0 -> 1 : 0 | | 2 -> 3 : 0 | | 4 -> 7 : 0 | | 8 -> 15 : 0 | | 16 -> 31 : 0 | | 32 -> 63 : 0 | | 64 -> 127 : 0 | | 128 -> 255 : 0 | | 256 -> 511 : 103067 |****************************************| 512 -> 1023 : 39054 |*************** | 1024 -> 2047 : 8953 |*** | 2048 -> 4095 : 12986 |***** | 4096 -> 8191 : 10173 |*** | 8192 -> 16383 : 8090 |*** | 16384 -> 32767 : 890 | | 32768 -> 65535 : 540 | | 65536 -> 131071 : 198 | | 131072 -> 262143 : 50 | | 262144 -> 524287 : 7 | | avg = 1837 nsecs, total: 338115740 nsecs, count: 184008 * Linux 5.15.25 + your latest patch with "if_late": $ sudo /usr/share/bcc/tools/funclatency -d 60 workingset_refault Tracing 1 functions for "workingset_refault"... Hit Ctrl-C to end. nsecs : count distribution 0 -> 1 : 0 | | 2 -> 3 : 0 | | 4 -> 7 : 0 | | 8 -> 15 : 0 | | 16 -> 31 : 0 | | 32 -> 63 : 0 | | 64 -> 127 : 0 | | 128 -> 255 : 0 | | 256 -> 511 : 9241 |****************************************| 512 -> 1023 : 7041 |****************************** | 1024 -> 2047 : 1457 |****** | 2048 -> 4095 : 3401 |************** | 4096 -> 8191 : 2207 |********* | 8192 -> 16383 : 130 | | 16384 -> 32767 : 53 | | 32768 -> 65535 : 40 | | 65536 -> 131071 : 16 | | 131072 -> 262143 : 1 | | 262144 -> 524287 : 1 | | avg = 1663 nsecs, total: 39249164 nsecs, count: 23588 The numbers look pretty good.