summaryrefslogtreecommitdiff
path: root/CREDITS
diff options
context:
space:
mode:
authorLi Li <dualli@google.com>2022-05-27 01:00:18 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-27 17:16:30 +0300
commit9864bb4801331daa48514face9d0f4861e4d485b (patch)
treea4f8e9cb3b6a8faa547afe5b6e42c12c894dad18 /CREDITS
parent5afbfa8cddb451432016fd37d836f9e5b1f0d6cb (diff)
downloadlinux-9864bb4801331daa48514face9d0f4861e4d485b.tar.xz
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 <tkjos@google.com> Signed-off-by: Li Li <dualli@google.com> Link: https://lore.kernel.org/r/20220526220018.3334775-2-dualli@chromium.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'CREDITS')
0 files changed, 0 insertions, 0 deletions