android_kernel_motorola_sm6375/include
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Li Li d86fa67db0 FROMGIT: Binder: add TF_UPDATE_TXN to replace outdated txn
When the target process is busy, incoming oneway transactions are
queued in the async_todo list. If the clients continue sending extra
oneway transactions while the target process is frozen, this queue can
become too large to accommodate new transactions. That's why binder
driver introduced ONEWAY_SPAM_DETECTION to detect this situation. It's
helpful to debug the async binder buffer exhausting issue, but the
issue itself isn't solved directly.

In real cases applications are designed to send oneway transactions
repeatedly, delivering updated inforamtion to the target process.
Typical examples are Wi-Fi signal strength and some real time sensor
data. Even if the apps might only care about the lastet information,
all outdated oneway transactions are still accumulated there until the
frozen process is thawed later. For this kind of situations, there's
no existing method to skip those outdated transactions and deliver the
latest one only.

This patch introduces a new transaction flag TF_UPDATE_TXN. To use it,
use apps can set this new flag along with TF_ONE_WAY. When such an
oneway transaction is to be queued into the async_todo list of a frozen
process, binder driver will check if any previous pending transactions
can be superseded by comparing their code, flags and target node. If
such an outdated pending transaction is found, the latest transaction
will supersede that outdated one. This effectively prevents the async
binder buffer running out and saves unnecessary binder read workloads.

Acked-by: Todd Kjos <[email protected]>
Signed-off-by: Li Li <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Bug: 231624308
Test: manually check async binder buffer size of frozen apps
Test: stress test with kernel 4.14/4.19/5.10/5.15
(cherry picked from commit 9864bb4801331daa48514face9d0f4861e4d485b
 git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
  char-misc-next)
Change-Id: I1c4bff1eda1ca15aaaad5bf696c8fc00be743176
2023-02-05 16:26:36 +01:00
..
acpi ACPI: CPPC: Do not prevent CPPC from working in the future 2022-08-25 11:18:15 +02:00
asm-generic This is the 5.4.212 stable release 2022-09-21 12:34:35 +02:00
clocksource
crypto Merge tag 'ASB-2022-11-01_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina 2022-11-09 19:53:28 +02:00
drm Revert "drm: fix EDID struct for old ARM OABI format" 2022-06-22 16:59:04 +02:00
dt-bindings Merge tag 'ASB-2023-01-05_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina 2023-01-06 17:27:03 +02:00
keys
kvm
linux Merge tag 'ASB-2023-01-05_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina 2023-01-06 17:27:03 +02:00
math-emu
media
misc
net Merge tag 'LA.UM.9.14.r1-21000-LAHAINA.QSSI13.0' of https://git.codelinaro.org/clo/la/kernel/msm-5.4 into android13-5.4-lahaina 2022-12-17 02:49:28 +02:00
pcmcia
ras
rdma
scsi This is the 5.4.218 stable release 2022-10-15 08:28:04 +02:00
soc icnss2: Add code to pass device configs to wlan driver 2022-03-09 20:16:22 +05:30
sound Merge tag 'ASB-2022-12-05_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina 2022-12-17 02:26:00 +02:00
target
trace Merge tag 'ASB-2022-12-05_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina 2022-12-17 02:26:00 +02:00
uapi FROMGIT: Binder: add TF_UPDATE_TXN to replace outdated txn 2023-02-05 16:26:36 +01:00
vdso
video video: of_display_timing.h: include errno.h 2022-07-12 16:30:47 +02:00
xen xen/gnttab: fix gnttab_end_foreign_access() without page specified 2022-03-11 11:22:39 +01:00
OWNERS