]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd/scrub: minimize calls to sysconf() in scrub_load_below_threshold() 63349/head
authorRonen Friedman <rfriedma@redhat.com>
Sat, 17 May 2025 07:17:42 +0000 (02:17 -0500)
committerRonen Friedman <rfriedma@redhat.com>
Mon, 19 May 2025 12:42:21 +0000 (07:42 -0500)
commitcf85a005dc797d477988f19c307ad11332975f61
tree87f929bca5e658a27dc60dfd25d567606920ac7b
parent257e5297dede03d1d798fee880b01e004c3f920f
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>
(cherry picked from commit 3392bc0f506768b6b3e2d65d549fa2e3b704fd6e)
src/osd/scrubber/osd_scrub.cc