mirror of https://gitee.com/openkylin/linux.git
greybus: loopback: Ensure we reset stats once and once only
9445c54c ('greybus/loopback: drop bus aggregate calculation') removed the aggregation of data in-kernel but instead of dropping the reset of aggregate stastics, converted that reset into a second reset of the connection-level stats. While this doesn't result in anything bad it's also definitely a dumb thing to be doing, so, drop it now. Also ensure we reset the bridge-specific tracking variables at least once. Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
b36f04fa94
commit
f42a6891d1
|
@ -837,19 +837,9 @@ static void gb_loopback_reset_stats(struct gb_loopback *gb)
|
|||
memcpy(&gb->gpbridge_firmware_latency, &reset,
|
||||
sizeof(struct gb_loopback_stats));
|
||||
|
||||
/* Set values to report min/max timeout to user-space */
|
||||
gb->timeout_min = jiffies_to_usecs(GB_LOOPBACK_TIMEOUT_MIN);
|
||||
gb->timeout_max = jiffies_to_usecs(GB_LOOPBACK_TIMEOUT_MAX);
|
||||
|
||||
/* Reset aggregate stats */
|
||||
memcpy(&gb->latency, &reset, sizeof(struct gb_loopback_stats));
|
||||
memcpy(&gb->throughput, &reset, sizeof(struct gb_loopback_stats));
|
||||
memcpy(&gb->requests_per_second, &reset,
|
||||
sizeof(struct gb_loopback_stats));
|
||||
memcpy(&gb->apbridge_unipro_latency, &reset,
|
||||
sizeof(struct gb_loopback_stats));
|
||||
memcpy(&gb->gpbridge_firmware_latency, &reset,
|
||||
sizeof(struct gb_loopback_stats));
|
||||
/* Should be initialized at least once per transaction set */
|
||||
gb->apbridge_latency_ts = 0;
|
||||
gb->gpbridge_latency_ts = 0;
|
||||
}
|
||||
|
||||
static void gb_loopback_update_stats(struct gb_loopback_stats *stats, u32 val)
|
||||
|
|
Loading…
Reference in New Issue