Description of problem:
Customer has found a possible lock contention on glibc's localtime_r() and asked to backport it. All RHEL variables from 4 to 7 don't have this fix.
"This patch is an "easy win" partial fix for BZ #16145, which notes
the heavy contention on tzset_lock when multiple threads are converting
times with localtime_r().
In __tz_convert(), the lock does not need to be held after
__tzfile_compute() / __tz_compute() have been called, so we can move the
unlock up. At this point there is still significant work to be done in
__offtime(), so we see some improvement (in my testing with 8 cores
banging on localtime_r(), ~20% improvement in throughput)."
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. No sure at this moment
- No fix
- Apply the upstream fix
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.