]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd/scrub: minimize calls to sysconf() in scrub_load_below_threshold() 63325/head
authorRonen Friedman <rfriedma@redhat.com>
Sat, 17 May 2025 07:17:42 +0000 (02:17 -0500)
committerRonen Friedman <rfriedma@redhat.com>
Sat, 17 May 2025 07:17:42 +0000 (02:17 -0500)
commit3392bc0f506768b6b3e2d65d549fa2e3b704fd6e
tree53e66a96dff989ab086a04bb584337bb69f6b169
parent4a0d5ea20acabb522c664b71d702f948098feaaf
osd/scrub: minimize calls to sysconf() in scrub_load_below_threshold()

Return an 'all is OK' value if the 1min CPU load - even before being
divided by the number of CPUs - is below the configured threshold.
This is a very common case, and avoids the need to call sysconf()
to get the number of CPUs.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
src/osd/scrubber/osd_scrub.cc