Skip to content

Reduce rwlock contention in isc_log_wouldlog()

The rwlock introduced to protect the .logconfig member of isc_log_t structure caused a significant performance drop because of the rwlock contention. It was also found, that the debug_level member of said structure was not protected from concurrent read/writes.

The .dynamic and .highest_level members of isc_logconfig_t structure were actually just cached values pulled from the assigned channels.

We introduced an even higher cache level for .dynamic and .highest_level members directly into the isc_log_t structure, so we don't have to access the .logconfig member in the isc_log_wouldlog() function.

(cherry picked from commit 3a24eacb)

Closes #1717 (closed)

Merge request reports