Skip to content
  • Ondřej Surý's avatar
    Reduce rwlock contention in isc_log_wouldlog() · 3a24eacb
    Ondřej Surý authored and Ondřej Surý's avatar Ondřej Surý committed
    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.
    3a24eacb