linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Ivan Babrou <ivan@cloudflare.com>
To: Shakeel Butt <shakeelb@google.com>
Cc: "Michal Koutný" <mkoutny@suse.com>,
	"Daniel Dao" <dqminh@cloudflare.com>,
	kernel-team <kernel-team@cloudflare.com>,
	"Linux MM" <linux-mm@kvack.org>,
	"Johannes Weiner" <hannes@cmpxchg.org>,
	"Roman Gushchin" <guro@fb.com>, "Feng Tang" <feng.tang@intel.com>,
	"Michal Hocko" <mhocko@kernel.org>,
	"Hillf Danton" <hdanton@sina.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Linus Torvalds" <torvalds@linux-foundation.org>
Subject: Re: Regression in workingset_refault latency on 5.15
Date: Thu, 3 Mar 2022 16:21:20 -0800	[thread overview]
Message-ID: <CABWYdi2usrWOnOnmKYYvuFpE=yJmgtq4a7u6FiGJGJkskv+eVQ@mail.gmail.com> (raw)
In-Reply-To: <20220303023504.gux47rd5wvnikymh@google.com>

On Wed, Mar 2, 2022 at 6:35 PM Shakeel Butt <shakeelb@google.com> 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 <ivan@cloudflare.com> 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.


  reply	other threads:[~2022-03-04  1:10 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-23 13:51 Daniel Dao
2022-02-23 15:57 ` Shakeel Butt
2022-02-23 16:00   ` Shakeel Butt
2022-02-23 17:07     ` Daniel Dao
2022-02-23 17:36       ` Shakeel Butt
2022-02-23 19:28         ` Ivan Babrou
2022-02-23 20:28           ` Shakeel Butt
2022-02-23 21:16             ` Ivan Babrou
2022-02-24 14:46               ` Daniel Dao
2022-02-24 16:58                 ` Shakeel Butt
2022-02-24 17:34                   ` Daniel Dao
2022-02-24 18:00                     ` Shakeel Butt
2022-02-24 18:52                       ` Shakeel Butt
2022-02-25 10:23                         ` Daniel Dao
2022-02-25 17:08                           ` Ivan Babrou
2022-02-25 17:22                             ` Shakeel Butt
2022-02-25 18:03                             ` Michal Koutný
2022-02-25 18:08                               ` Ivan Babrou
2022-02-28 23:09                                 ` Shakeel Butt
2022-02-28 23:34                                   ` Ivan Babrou
2022-02-28 23:43                                     ` Shakeel Butt
2022-03-02  0:48                                     ` Ivan Babrou
2022-03-02  2:50                                       ` Shakeel Butt
2022-03-02  3:40                                         ` Ivan Babrou
2022-03-02 22:33                                           ` Ivan Babrou
2022-03-03  2:32                                             ` Shakeel Butt
2022-03-03  2:35                                             ` Shakeel Butt
2022-03-04  0:21                                               ` Ivan Babrou [this message]
2022-03-04  1:05                                                 ` Shakeel Butt
2022-03-04  1:12                                                   ` Ivan Babrou
2022-03-02 11:49                                         ` Frank Hofmann
2022-03-02 15:52                                           ` Shakeel Butt
2022-03-02 10:08                                       ` Michal Koutný
2022-03-02 15:53                                         ` Shakeel Butt
2022-03-02 17:28                                           ` Ivan Babrou
2022-02-24  9:22 ` Thorsten Leemhuis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABWYdi2usrWOnOnmKYYvuFpE=yJmgtq4a7u6FiGJGJkskv+eVQ@mail.gmail.com' \
    --to=ivan@cloudflare.com \
    --cc=akpm@linux-foundation.org \
    --cc=dqminh@cloudflare.com \
    --cc=feng.tang@intel.com \
    --cc=guro@fb.com \
    --cc=hannes@cmpxchg.org \
    --cc=hdanton@sina.com \
    --cc=kernel-team@cloudflare.com \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=mkoutny@suse.com \
    --cc=shakeelb@google.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox