]> git.baikalelectronics.ru Git - kernel.git/commit
platform/surface: aggregator: Add control packet allocation caching
authorMaximilian Luz <luzmaximilian@gmail.com>
Mon, 21 Dec 2020 18:39:52 +0000 (19:39 +0100)
committerHans de Goede <hdegoede@redhat.com>
Wed, 6 Jan 2021 22:45:33 +0000 (23:45 +0100)
commit505b9bf9f1a8ed124159a269c395816a247196a7
tree7faf78c2795d9c3e42590430a93b9fa345e9d407
parent1dddf157a63b1d89bfa9a030a42d21ca145b7d8d
platform/surface: aggregator: Add control packet allocation caching

Surface Serial Hub communication is, in its core, packet based. Each
sequenced packet requires to be acknowledged, via an ACK-type control
packet. In case invalid data has been received by the driver, a NAK-type
(not-acknowledge/negative acknowledge) control packet is sent,
triggering retransmission.

Control packets are therefore a core communication primitive and used
frequently enough (with every sequenced packet transmission sent by the
embedded controller, including events and request responses) that it may
warrant caching their allocations to reduce possible memory
fragmentation.

Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20201221183959.1186143-3-luzmaximilian@gmail.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/surface/aggregator/core.c
drivers/platform/surface/aggregator/ssh_packet_layer.c
drivers/platform/surface/aggregator/ssh_packet_layer.h