aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorAntoine Tenart <[email protected]>2022-09-16 11:29:40 +0200
committerFlorian Westphal <[email protected]>2022-09-21 10:44:56 +0200
commit95eabdd207024312876d0ebed90b4c977e050e85 (patch)
treee1cdc080b4e80db1561b2e2e13db346c814a7ac9 /tools/perf/scripts/python/stackcollapse.py
parentc29b068215906d33f75378d44526edc37ad08276 (diff)
netfilter: conntrack: fix the gc rescheduling delay
Commit 2cfadb761d3d ("netfilter: conntrack: revisit gc autotuning") changed the eviction rescheduling to the use average expiry of scanned entries (within 1-60s) by doing: for (...) { expires = clamp(nf_ct_expires(tmp), ...); next_run += expires; next_run /= 2; } The issue is the above will make the average ('next_run' here) more dependent on the last expiration values than the firsts (for sets > 2). Depending on the expiration values used to compute the average, the result can be quite different than what's expected. To fix this we can do the following: for (...) { expires = clamp(nf_ct_expires(tmp), ...); next_run += (expires - next_run) / ++count; } Fixes: 2cfadb761d3d ("netfilter: conntrack: revisit gc autotuning") Cc: Florian Westphal <[email protected]> Signed-off-by: Antoine Tenart <[email protected]> Signed-off-by: Florian Westphal <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions