Skip to content

DAOS-18607 placement: generate partial layout for rebuild and EC aggregation#17829

Merged
gnailzenh merged 2 commits intomasterfrom
liang/b_pl_partial
Apr 3, 2026
Merged

DAOS-18607 placement: generate partial layout for rebuild and EC aggregation#17829
gnailzenh merged 2 commits intomasterfrom
liang/b_pl_partial

Conversation

@gnailzenh
Copy link
Copy Markdown
Collaborator

@gnailzenh gnailzenh commented Mar 30, 2026

Rebuild and EC aggregation do not require the full object layout;
instead, they only need the localities of the shards within the
same redundancy group as the current shard.

This patch stops the layout computation after generating the layout
for the requested redundancy group, saving a significant amount of
computation resources.

Steps for the author:

  • Commit message follows the guidelines.
  • Appropriate Features or Test-tag pragmas were used.
  • Appropriate Functional Test Stages were run.
  • At least two positive code reviews including at least one code owner from each category referenced in the PR.
  • Testing is complete. If necessary, forced-landing label added and a reason added in a comment.

After all prior steps are complete:

  • Gatekeeper requested (daos-gatekeeper added as a reviewer).

@github-actions
Copy link
Copy Markdown

Errors are Unable to load ticket data
https://daosio.atlassian.net/browse/DAOS-18607

EC aggregation doesn't require full layout computation, instead it only
requires the layout up to the specified group.

This patch adds an option and allows the placement function to complete
layout computation early. It can significantly reduce computation time
for EC aggregation.

Signed-off-by: Liang Zhen <gnailzenh@gmail.com>
@gnailzenh gnailzenh force-pushed the liang/b_pl_partial branch from 4bd5fbf to 630fd47 Compare March 30, 2026 07:54
@gnailzenh gnailzenh requested review from a team as code owners March 30, 2026 07:54
Comment thread src/placement/jump_map.c Outdated
}

if (gen_mode != PRE_REBUILD || !(md->omd_flags & PL_FL_GRP_SPEC))
md->omd_grp_spec = PL_GRP_MAX; /* full layout */
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR looks can work. Just a few concern that the generated layout actually with partial valid data compared to the definition -
73 struct pl_obj_layout {
74 > uint32_t> > ol_ver;
75 > uint32_t> > ol_grp_size;
76 > uint32_t> > ol_grp_nr;
77 > uint32_t> > ol_nr;
78 > /* number of peer targets, this field is added for reint/extension/drain placement */
79 > unsigned int ol_shard_peers;
80 > struct pl_obj_shard> *ol_shards;
81 };

seems 2 options -

  1. set the ol_nr, ol_grp_nr as actual value, or
  2. set ol_nr, ol_grp_nr same as current code (pl_obj_layout_alloc(jmop->jmop_grp_size, jmop->jmop_grp_nr) above), but assert it will not exceed valid range when using it in srv_ec_aggregate.c?

And seems for obj_reclaim() it can also use similar method?

Signed-off-by: Liang Zhen <gnailzenh@gmail.com>
@wangshilong wangshilong requested a review from liuxuezhao April 1, 2026 06:31
Comment thread src/placement/jump_map.c

if (md->omd_grp_spec != PL_GRP_MAX) {
/* may have generated the full layout, but ignore other parts */
layout->ol_grp_nr = md->omd_grp_spec + 1;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

md->omd_grp_spec may be set as a value > jmop->jmop_grp_nr - 1,
seems that either check that case and return failure,
or here set "layout->ol_grp_nr = min(md->omd_grp_spec + 1, jmop->jmop_grp_nr)"?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably can change it in a following PR, if it is correct.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, would be nice to add this check in the future.
I will add it while applying this to dsc_obj_open()

Comment thread src/placement/jump_map.c
Comment thread src/placement/jump_map.c
Comment thread src/placement/jump_map.c

if (md->omd_grp_spec != PL_GRP_MAX) {
/* may have generated the full layout, but ignore other parts */
layout->ol_grp_nr = md->omd_grp_spec + 1;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably can change it in a following PR, if it is correct.

gnailzenh added a commit that referenced this pull request Apr 2, 2026
Rebuild and EC aggregation do not require the full object layout;
instead, they only need the localities of the shards within the
same redundancy group as the current shard.

This patch stops the layout computation after generating the layout
for the requested redundancy group, saving a significant amount of
computation resources.

Signed-off-by: Liang Zhen <gnailzenh@gmail.com>
@gnailzenh gnailzenh changed the title DAOS-18607 placement: only compute required part of layout DAOS-18607 placement: generate partial layout for rebuild and EC aggregation Apr 2, 2026
mchaarawi pushed a commit that referenced this pull request Apr 2, 2026
Rebuild and EC aggregation do not require the full object layout;
instead, they only need the localities of the shards within the
same redundancy group as the current shard.

This patch stops the layout computation after generating the layout
for the requested redundancy group, saving a significant amount of
computation resources.

Signed-off-by: Liang Zhen <gnailzenh@gmail.com>
@gnailzenh gnailzenh merged commit d9b63c0 into master Apr 3, 2026
42 checks passed
@gnailzenh gnailzenh deleted the liang/b_pl_partial branch April 3, 2026 07:56
gnailzenh added a commit that referenced this pull request Apr 8, 2026
…egation (#17829) (#17896)

EC aggregation doesn't require full layout computation, instead it only
requires the layout up to the specified group.

This patch adds an option and allows the placement function to complete
layout computation early. It can significantly reduce computation time
for EC aggregation.

Signed-off-by: Liang Zhen <gnailzenh@gmail.com>

* DAOS: rebuild scan/reclaim also uses partial layout

Signed-off-by: Liang Zhen <gnailzenh@gmail.com>

---------

Signed-off-by: Liang Zhen <gnailzenh@gmail.com>
gnailzenh added a commit that referenced this pull request Apr 8, 2026
…egation (#17829) (#17879)

EC aggregation doesn't require full layout computation, instead it only
requires the layout up to the specified group.
    
This patch adds an option and allows the placement function to complete
layout computation early. It can significantly reduce computation time
for EC aggregation.

Signed-off-by: Liang Zhen <gnailzenh@gmail.com>
mchaarawi added a commit that referenced this pull request Apr 14, 2026
mchaarawi added a commit that referenced this pull request Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants