]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd/scheduler/mClockScheduler: simplify profile handling
authorSamuel Just <sjust@redhat.com>
Wed, 29 Mar 2023 07:10:57 +0000 (00:10 -0700)
committerSridhar Seshasayee <sseshasa@redhat.com>
Thu, 27 Apr 2023 13:11:54 +0000 (18:41 +0530)
commite1b909c8e72916ecfd6447c508f0f0a2e536da46
tree84cc059c10ee44684c9832c8f9c61d66f22d0ccf
parentd04b907d319ff6801859dd3852d7e4805a755258
osd/scheduler/mClockScheduler: simplify profile handling

Previously, setting default configs from the configured profile was
split across:
- enable_mclock_profile_settings
- set_mclock_profile - sets mclock_profile class member
- set_*_allocations - updates client_allocs class member
- set_profile_config - sets profile based on client_allocs class member

This made tracing the effect of changing the profile pretty challenging
due passing state through class member variables.

Instead, define a simple profile_t with three constexpr values
corresponding to the three profiles and handle it all in a single
set_config_defaults_from_profile() method.

Signed-off-by: Samuel Just <sjust@redhat.com>
src/osd/scheduler/mClockScheduler.cc
src/osd/scheduler/mClockScheduler.h