<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Alexander,</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 20, 2021 at 3:26 PM Alexander Egorenkov <<a href="mailto:egorenar@linux.ibm.com">egorenar@linux.ibm.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail_default" style="font-size:small">...</span><br>
<br>
Hi,<br>
<br>
i did more tests as promised.<br>
Your patch didn't help :( Still seeing failures.<br>
<br>
With your patch:<br>
----------------<br>
swapping01.c:148: TPASS: no heavy swapping detected, 7282 MB swapped.<br>
swapping01.c:107: TINFO: available physical memory: 7303 MB<br>
swapping01.c:110: TINFO: try to allocate: 9494 MB<br>
swapping01.c:113: TINFO: memory allocated: 9494 MB<br>
swapping01.c:148: TPASS: no heavy swapping detected, 6204 MB swapped.<br>
swapping01.c:107: TINFO: available physical memory: 7299 MB<br>
swapping01.c:110: TINFO: try to allocate: 9488 MB<br>
swapping01.c:113: TINFO: memory allocated: 9488 MB<br>
swapping01.c:144: TFAIL: heavy swapping detected: 9490 MB swapped.<br>
<br>
Summary:<br>
passed 27<br>
failed 1<br>
skipped 0<br>
warnings 0<br>
<br>
<br>
W/O your patch:<br>
---------------<br>
swapping01.c:147: TPASS: no heavy swapping detected, 2229 MB swapped.<br>
swapping01.c:106: TINFO: available physical memory: 7311 MB<br>
swapping01.c:109: TINFO: try to allocate: 9504 MB<br>
swapping01.c:112: TINFO: memory allocated: 9504 MB<br>
swapping01.c:147: TPASS: no heavy swapping detected, 2249 MB swapped.<br>
swapping01.c:106: TINFO: available physical memory: 7306 MB<br>
swapping01.c:109: TINFO: try to allocate: 9498 MB<br>
swapping01.c:112: TINFO: memory allocated: 9498 MB<br>
swapping01.c:143: TFAIL: heavy swapping detected: 9496 MB swapped.<br>
<br>
Summary:<br>
passed 23<br>
failed 1<br>
skipped 0<br>
warnings 0<br>
<br>
<br>
<br>
I can easily reproduce the problem inside an LPAR with <span class="gmail_default" style="font-size:small"></span>8GB RAM and 20GB<br>
swap. But could *NOT* reproduce it inside a zVM w/o any patches, might be<br>
fluke or some other unknown factors probably. </blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
My patch seems to work very well, couldn't reproduce the problem with it<br>
applied :/ <br></blockquote><div><br></div><div class="gmail_default" style="font-size:small">I'm now a little bit doubt the lawful of swapping01 since I can easily get</div><div class="gmail_default" style="font-size:small">heavy-swapping[1] when increasing the value of COE_SLIGHT_OVER </div><div class="gmail_default" style="font-size:small">(which means just to request more available memory).</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">The original purpose of swapping01 seems to verify NO heavy-swapping</div><div class="gmail_default" style="font-size:small">with slightly over-use available memory, but it doesn't have a standard</div><div class="gmail_default" style="font-size:small">to evaluate/say how much is slightly over-use(the default set 1.3*phy_mem).</div><div class="gmail_default" style="font-size:small">But I guess that might influence by different config of system, e.g the system</div><div class="gmail_default" style="font-size:small">you tried with <span class="gmail_default"></span>8GB RAM and 20GB swap, that swap more likely to be overused.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Anyway, these are my personal perspective, maybe wrong, we still need more investigation.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">[1] the conception of heavy-swapping in this test define by: </div><div class="gmail_default" style="font-size:small"> swapped > mem_available_init</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--------------------------------</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">The test FAIL(With and W/O your patch) on an aarch64 platform:</div><div class="gmail_default" style="font-size:small">(allocate 2*mem_available but not 1.3*mem_available)</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"># free -h<br> total used free shared buff/cache available<br>Mem: 5.4Gi 329Mi 5.0Gi 0.0Ki 152Mi 4.6Gi<br>Swap: 6.0Gi 194Mi 5.8Gi<br><br></div><div class="gmail_default" style="font-size:small"> # ./swapping01 <br>tst_test.c:1263: TINFO: Timeout per run is 0h 05m 00s<br>swapping01.c:107: TINFO: available physical memory: 4745 MB<br>swapping01.c:109: TINFO: try to allocate: 9491 MB<br>swapping01.c:112: TINFO: memory allocated: 9491 MB<br>swapping01.c:135: TINFO: DEBUG-INFO: swap_free_init = 6107200, swap_free_now = 1339520, swap_consum(swap_free_init - swap_free_now) = 4767680<br>swapping01.c:135: TINFO: DEBUG-INFO: swap_free_init = 6107200, swap_free_now = 1196160, swap_consum(swap_free_init - swap_free_now) = 4911040<br>swapping01.c:135: TINFO: DEBUG-INFO: swap_free_init = 6107200, swap_free_now = 1200256, swap_consum(swap_free_init - swap_free_now) = 4906944<br>swapping01.c:150: TFAIL: heavy swapping detected: 4791 MB swapped.<br><br></div><div class="gmail_default" style="font-size:small">(Debug-Info shows that 'swap_free_now' dynamically changes</div><div class="gmail_default" style="font-size:small">not only decrease but also increase during the testing, it looks like</div><div class="gmail_default" style="font-size:small">the system tries to reclaim some memory and do balance for a while.</div><div class="gmail_default" style="font-size:small">But the worth saying, no OOM occurred during the above memory</div><div class="gmail_default" style="font-size:small">overused.)</div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>