[OnePlus 3 & 3T Cross Device Development] :
Lagging

That dosn't make sense: It's not important what's actually in /proc/sys/vm/drop_caches - when /proc/sys/vm/drop_caches is written a kernel function is triggred, which flushes aspects of the buffer cache (depending on the value, which is written). That's it. Period.

No matter, what's the current value, the next time it is written it triggers flushing again. Caching isn't disabled, no matter what's in currently.

Also note that only clean pages are droped by this command, to force to write dirty pages from the buffers in ram to disk, sync is needed.

oneplus3 / # free && sync && echo 3 > /proc/sys/vm/drop_caches && free && sleep 300 && free
total used free shared buffers
Mem: 6013739008 3293777920 2719961088 17162240 2445312
-/+ buffers/cache: 3291332608 2722406400
Swap: 0 0 0
total used free shared buffers
Mem: 6013739008 3248603136 2765135872 17162240 348160
-/+ buffers/cache: 3248254976 2765484032
Swap: 0 0 0
total used free shared buffers
Mem: 6013739008 4034326528 1979412480 18202624 1257472
-/+ buffers/cache: 4033069056 1980669952
Swap: 0 0 0
oneplus3 / #cat /proc/sys/vm/drop_caches
3
oneplus3 / #

For reference see: https://github.com/LineageOS/androi...lineage-15.1/Documentation/sysctl/vm.txt#L179

For your observation with kswapd: The top outputs I've seen sofar show kswapd with 30 - 40 %. This shouldn't make the device laggy. It surely does not add io load, because we have NO swap on mass storage devices (we don't have any swap space for that matter - zswap in zram isn't activated).

BTW: I'm not so sure like others that we deal with only one issue. I'm still pretty sure the first reporters doesn't suffer from a mem leak - for the report of [MENTION=3986617]ciarpame[/MENTION] ther seems to be an low mem issue...

The next obvious question is: why do we have swap activated (in the kernel config) at all, if we don't use swap? Because:

https://review.lineageos.org/#/c/LineageOS/android_kernel_oneplus_msm8996/+/223155/

I highly doubt, that this commit is breaking stuff, but who knows, so:

Has anybody expirienced lagging before 20180814 build?

EDIT:

I maybe wrong - i.e. caesium doesn't have MEMCG_SWAP configured (https://github.com/MSF-Jarvis/oneplus3/blob/XOS-8.1/arch/arm64/configs/caesium_defconfig ).

EDIT2:

Attached you find a boot.img build from the current LineageOS sources with https://review.lineageos.org/#/c/LineageOS/android_kernel_oneplus_msm8996/+/223155/ reverted. If the issue is the amoking kswapd, this should fix it - those, w suffer from lagging: please try and report back. Thanx!

Th attached archive is NOT a flashable zip. Unzip and flash the contained boot-no-swap.imgmas image in twrp. If you have bootimage altering packages installed (like Magisk), reflash them directly after flashing the image.

Can anybody confirm lagging with caesium and/or lagging on a build prior to 2180814?

---------- Post added at 13:22 ---------- Previous post was at 13:00 ----------

I'm not sure. I guess it's eventually triggered by an app, and finding the app triggering helps getting to the cause.

I'm sure the trigger is installation specific (not the process of installing, but the finally running individual installation on the device). Otherwise the lagging would be present on all installations. Finding the trigger and following the white rabbit is the only idea (at least for me) I have currently to hunt this ****ing issue down.