WIP: axfr: incoming/finalize: removed synchronize_rcu() in favour of freeing zone con…
…tents inside call_rcu()
This patch is a proposal for speeding up AXFR of a lot of zones.
WIP: there is no work-in-progress on this patch, the tag just prevents random merge temptations.
Drawbacks:
- not well-tested, not sure if it doesn'h have fatal effect in some circumstances
- valgrind reports tiny memory-leak (< 500 bytes), not solvable*, mostly an issue for our integration tests
Origin: It has been observed with bootstrapping many (>= thousands) zones via AXFR that there is a significant delay in "consume" phase (~ 30 ms in our case). It can be workarounded by increasing the number of background-workers (raised from 1 to 10, caused doubling the delay, put the parallelism speeded it up anyway). The delay was tracked down to synchronize_rcu() in axfr_answer_finalize().
TODO: Open question is which rcu_read_lock actually makes the synchronize_rcu() routines wait and if it couldn't be removed/speed-uped/solved instead.
Suspecting the synchronize_rcu() barrier is there just for safe freeing old zone contents, this patch removes it and with the help of call_rcu (wrapped for cleaner code) makes the freeing asynchronously wait for grace period.
-
- the "leaked" sructures are just pseudo-static objects for further call_rcu() invocations queue processing, see https://bugs.lttng.org/issues/991