From 16ad488d27d4c0b664e9efa3ead9e0fe9d1f2316 Mon Sep 17 00:00:00 2001 From: Ronen Friedman Date: Thu, 13 Jun 2024 05:33:00 -0500 Subject: [PATCH] osd/scrub: Modify osd_scrub_sched.h high-level diagram to convey the change in the scheduling data ownership: no longer a scrub-job object shared between the Scrubber and the OSD scrub queue. Instead - the scrub queue holds a copied snapshot of the scheduling data. Signed-off-by: Ronen Friedman --- src/osd/scrubber/osd_scrub_sched.h | 143 +++++++++++++++-------------- 1 file changed, 72 insertions(+), 71 deletions(-) diff --git a/src/osd/scrubber/osd_scrub_sched.h b/src/osd/scrubber/osd_scrub_sched.h index 75708af7bcf09..fd11dfa06cd77 100644 --- a/src/osd/scrubber/osd_scrub_sched.h +++ b/src/osd/scrubber/osd_scrub_sched.h @@ -4,77 +4,78 @@ #pragma once // clang-format off /* -┌───────────────────────┐ -│ OSD │ -│ OSDService │ -│ │ -│ ┌─────────────────────│ -│ │ │ -│ │ OsdScrub │ -│ │ ─┼───┐ -│ │ │ │ -└───────────────────────┘ │ Ownes & uses the following - │ ScrubQueue interfaces: - │ - │ - │ - resource management (*1) - │ - │ - environment conditions (*2) - │ - │ - scrub scheduling (*3) - │ - │ - │ - ScrubQueue │ -┌───────────────────────────▼────────────┐ -│ │ -│ │ -│ ScrubQContainer to_scrub <>────────┼────────┐ -│ │ │ -│ │ │ -│ OSD_wide resource counters │ │ -│ │ │ -│ │ │ -│ "env scrub conditions" monitoring │ │ -│ │ │ -│ │ │ -│ │ │ -│ │ │ -└─▲──────────────────────────────────────┘ │ - │ │ - │ │ - │uses interface <4> │ - │ │ - │ │ - │ ┌──────────────────────────────────┘ - │ │ shared ownership of jobs - │ │ - │ ┌─────▼──────┐ - │ │ScrubJob │ - │ │ ├┐ - │ │ ││ - │ │ │┼┐ - │ │ │┼│ - └──────┤ │┼┤◄──────┐ - │ │┼│ │ - │ │┼│ │ - │ │┼│ │ - └┬───────────┼┼│ │shared ownership - └─┼┼┼┼┼┼┼┼┼┼┼┼│ │ - └───────────┘ │ - │ - │ - │ - │ -┌───────────────────────────────┼─┐ -│ <>│ -│PgScrubber │ -│ │ -│ │ -│ │ -│ │ -│ │ -└─────────────────────────────────┘ + ┌───────────────────────┐ + │ OSD │ + │ OSDService │ + │ │ + │ ┌─────────────────────┤ + │ │ │ + │ │ OsdScrub │ + │ │ ─┼───┐ + │ │ │ │ + └─┴─────────────────────┘ │ Owns & uses the following + │ ScrubQueue interfaces: + │ + │ + │ - resource management (*1) + │ + │ - environment conditions (*2) + │ + │ - scrub scheduling (*3) + │ + │ + │ + ScrubQueue │ + ┌───────────────────────────▼────────────┐ + │ │ + │ │ + │ ScrubQContainer to_scrub <>────────┼────────┐ + │ │ │ + │ │ │ + │ OSD_wide resource counters │ │ + │ │ │ + │ │ │ + │ "env scrub conditions" monitoring │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + └─▲──────────────────────────────────────┘ │ + │ │ + │ │ + │uses interface <4> │ + │ │ + │ │ + │ ┌──────────────────────────────────┘ + │ │ + │ │ + │ ┌─────▼──────┐ + │ │Copy of │ + │ │job's ├┐ + │ │sched params││ + │ │(*) │┼┐ + │ │ │┼┘◄────────────────────────┐ + └──────┤ ││ │ + │ ││ (*) for now - a copy │ + │ ││ of the whole SJ │ + │ ││ │ + └┬───────────┼│ │ + └─┼┼┼┼┼┼┼┼┼┼┼│ │ + └──────────┘ │ + │ + │ │ + │ + ┌─────────────────────────────────┐ │ + │ <>│ │ + │PgScrubber │ │ + │ ┌─────────────────┴───┐ │ + │ │ScrubJob │ │ + │ │ │ │ + │ │ ┌───────────────┤ │ + │ │ │Sched params ├───────────┘ + └───────────────┤ └───────────────┤ + │ │ + └─────────────────────┘ ScrubQueue interfaces (main functions): -- 2.39.5