qcacld-3.0: add TX packet threshold for DP SWLM
Add TX packet threshold while considering for TX write coalescing. This helps improve low throughput TCP DL & UL cases. Change-Id: I9503a0b28a58dcaddbb08f3a98479bb31cd95285 CRs-Fixed: 2931051
This commit is contained in:
parent
8ac9fdb220
commit
0a138d0177
@ -37,23 +37,30 @@ static bool dp_swlm_is_tput_thresh_reached(struct dp_soc *soc)
|
||||
{
|
||||
struct dp_swlm *swlm = &soc->swlm;
|
||||
static int prev_rx_bytes, prev_tx_bytes;
|
||||
int rx_delta, tx_delta;
|
||||
int rx_delta, tx_delta, tx_packet_delta;
|
||||
static int prev_tx_packets;
|
||||
bool result = false;
|
||||
|
||||
tx_delta = soc->stats.tx.egress.bytes - prev_tx_bytes;
|
||||
prev_tx_bytes = soc->stats.tx.egress.bytes;
|
||||
if (tx_delta > swlm->params.tcl.tx_traffic_thresh) {
|
||||
swlm->params.tcl.sampling_session_tx_bytes = tx_delta;
|
||||
return true;
|
||||
result = true;
|
||||
}
|
||||
|
||||
rx_delta = soc->stats.rx.ingress.bytes - prev_rx_bytes;
|
||||
prev_rx_bytes = soc->stats.rx.ingress.bytes;
|
||||
if (rx_delta > swlm->params.tcl.rx_traffic_thresh) {
|
||||
if (!result && rx_delta > swlm->params.tcl.rx_traffic_thresh) {
|
||||
swlm->params.tcl.sampling_session_tx_bytes = tx_delta;
|
||||
return true;
|
||||
result = true;
|
||||
}
|
||||
|
||||
return false;
|
||||
tx_packet_delta = soc->stats.tx.egress.num - prev_tx_packets;
|
||||
prev_tx_packets = soc->stats.tx.egress.num;
|
||||
if (tx_packet_delta < swlm->params.tcl.tx_pkt_thresh)
|
||||
result = false;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -200,6 +207,7 @@ static inline QDF_STATUS dp_soc_swlm_tcl_attach(struct dp_soc *soc)
|
||||
swlm->params.tcl.time_flush_thresh = DP_SWLM_TCL_TIME_FLUSH_THRESH;
|
||||
swlm->params.tcl.tx_thresh_multiplier =
|
||||
DP_SWLM_TCL_TX_THRESH_MULTIPLIER;
|
||||
swlm->params.tcl.tx_pkt_thresh = DP_SWLM_TCL_TX_PKT_THRESH;
|
||||
|
||||
qdf_timer_init(soc->osdev, &swlm->params.tcl.flush_timer,
|
||||
dp_swlm_tcl_flush_timer, (void *)soc,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
@ -21,8 +21,10 @@
|
||||
|
||||
#define DP_SWLM_TCL_TPUT_PASS_THRESH 3
|
||||
|
||||
#define DP_SWLM_TCL_RX_TRAFFIC_THRESH 50
|
||||
#define DP_SWLM_TCL_TX_TRAFFIC_THRESH 50
|
||||
#define DP_SWLM_TCL_RX_TRAFFIC_THRESH 50
|
||||
#define DP_SWLM_TCL_TX_TRAFFIC_THRESH 50
|
||||
#define DP_SWLM_TCL_TX_PKT_THRESH 2
|
||||
|
||||
/* Traffic test time is in us */
|
||||
#define DP_SWLM_TCL_TRAFFIC_SAMPLING_TIME 250
|
||||
#define DP_SWLM_TCL_TIME_FLUSH_THRESH 1000
|
||||
|
Loading…
Reference in New Issue
Block a user