]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osd/scheduler/mClockScheduler: simplify profile handling
authorSridhar Seshasayee <sseshasa@redhat.com>
Wed, 29 Mar 2023 19:31:29 +0000 (01:01 +0530)
committerSridhar Seshasayee <sseshasa@redhat.com>
Mon, 8 May 2023 09:16:25 +0000 (14:46 +0530)
commita3c3c0223d5111be7c166a7f84b4183113a93913
treee53f90ed2f697f84f8f87c298d344973f076f4d6
parentb8a53d9660809a1b3be480f686e07190ee9f3380
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