]> git.ipfire.org Git - thirdparty/bind9.git/commit
Reduce rwlock contention in isc_log_wouldlog()
authorOndřej Surý <ondrej@isc.org>
Wed, 1 Apr 2020 09:50:32 +0000 (11:50 +0200)
committerOndřej Surý <ondrej@sury.org>
Thu, 2 Apr 2020 09:23:16 +0000 (11:23 +0200)
commit3a24eacbb619b89eacf87281b4d1a73e68c19471
tree15fe4e5d8db1419c3d471cabf7733f985fec77db
parent8e74974ce182b2fcd7dce82b1b68fa2ad922751b
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.
lib/isc/log.c