On Tue, Mar 1, 2022 at 7:40 PM Ivan Babrou <ivan@xxxxxxxxxxxxxx> wrote: > > On Tue, Mar 1, 2022 at 6:50 PM Shakeel Butt <shakeelb@xxxxxxxxxx> wrote: > > > > On Tue, Mar 01, 2022 at 04:48:00PM -0800, Ivan Babrou wrote: > > > > [...] > > > > > Looks like you were right that targeted flush is not going to be as good. > > > > > > Thanks a lot. Can you please try the following patch (independent of other > > patches) as well? > > Sure thing, I'll come back with the numbers tomorrow. Measurements from different configurations: * Baseline 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 : 15931 |****************************************| 512 -> 1023 : 7040 |***************** | 1024 -> 2047 : 1566 |*** | 2048 -> 4095 : 3844 |********* | 4096 -> 8191 : 1689 |**** | 8192 -> 16383 : 115 | | 16384 -> 32767 : 54 | | 32768 -> 65535 : 42 | | 65536 -> 131071 : 14 | | 131072 -> 262143 : 4 | | 262144 -> 524287 : 4 | | 524288 -> 1048575 : 92 | | 1048576 -> 2097151 : 2322 |***** | 2097152 -> 4194303 : 8244 |******************** | 4194304 -> 8388607 : 775 |* | 8388608 -> 16777215 : 73 | | avg = 776487 nsecs, total: 32464181849 nsecs, count: 41809 * 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 : 16271 |****************************************| 512 -> 1023 : 8147 |******************** | 1024 -> 2047 : 2743 |****** | 2048 -> 4095 : 3964 |********* | 4096 -> 8191 : 7137 |***************** | 8192 -> 16383 : 4039 |********* | 16384 -> 32767 : 352 | | 32768 -> 65535 : 214 | | 65536 -> 131071 : 80 | | 131072 -> 262143 : 15 | | 262144 -> 524287 : 0 | | 524288 -> 1048575 : 1 | | avg = 3248 nsecs, total: 139586555 nsecs, count: 42963 * Targeted 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 : 25298 |****************************************| 512 -> 1023 : 13334 |********************* | 1024 -> 2047 : 1519 |** | 2048 -> 4095 : 4265 |****** | 4096 -> 8191 : 2339 |*** | 8192 -> 16383 : 162 | | 16384 -> 32767 : 73 | | 32768 -> 65535 : 70 | | 65536 -> 131071 : 23 | | 131072 -> 262143 : 1 | | 262144 -> 524287 : 3 | | 524288 -> 1048575 : 55 | | 1048576 -> 2097151 : 1409 |** | 2097152 -> 4194303 : 8306 |************* | 4194304 -> 8388607 : 1139 |* | 8388608 -> 16777215 : 89 | | avg = 589361 nsecs, total: 34233041412 nsecs, count: 5808 * Your most recent patch: $ 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 : 37051 |****************************************| 512 -> 1023 : 17144 |****************** | 1024 -> 2047 : 1051 |* | 2048 -> 4095 : 2705 |** | 4096 -> 8191 : 1911 |** | 8192 -> 16383 : 184 | | 16384 -> 32767 : 93 | | 32768 -> 65535 : 70 | | 65536 -> 131071 : 30 | | 131072 -> 262143 : 21 | | 262144 -> 524287 : 216 | | 524288 -> 1048575 : 1100 |* | 1048576 -> 2097151 : 6522 |******* | 2097152 -> 4194303 : 5903 |****** | 4194304 -> 8388607 : 467 | | 8388608 -> 16777215 : 19 | | avg = 403261 nsecs, total: 30037729036 nsecs, count: 74487 Looks like there are plenty of longer pauses still. I can also get the numbers from 5.10 for you if you want.