Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[FRAME] Use 'ready' pages in XCMP suspend logic #2393

Merged
merged 11 commits into from
Mar 5, 2024
Merged

Conversation

ggwpez
Copy link
Member

@ggwpez ggwpez commented Nov 18, 2023

Changes:

  • QueueFootprint gets a new field; ready_pages that contains the non-overweight and not yet processed pages.
  • XCMP queue pallet is change to use the ready_pages instead of pages to calculate the channel suspension thresholds.

This should give the XCMP queue pallet a more correct view of when to suspend channels.

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@ggwpez ggwpez marked this pull request as ready for review November 20, 2023 10:31
@ggwpez ggwpez requested review from a team November 20, 2023 10:31
@ggwpez ggwpez added the T1-FRAME This PR/Issue is related to core FRAME, the framework. label Nov 20, 2023
@ggwpez ggwpez changed the title [FRAME] Use non-overweight pages in XCMP suspend logic [FRAME] Use 'ready' pages in XCMP suspend logic Nov 20, 2023
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Copy link
Contributor

@gpestana gpestana left a comment

Choose a reason for hiding this comment

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

LGTM, I suggest adding a simple try state assertion that checks if the number of ready pages is larger than the number of pages and any other invariants that could be useful.

@ggwpez ggwpez self-assigned this Nov 22, 2023
ggwpez added 2 commits March 5, 2024 13:53
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@ggwpez ggwpez requested a review from a team as a code owner March 5, 2024 12:54
@ggwpez ggwpez added T2-pallets This PR/Issue is related to a particular pallet. and removed T1-FRAME This PR/Issue is related to core FRAME, the framework. labels Mar 5, 2024
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
@ggwpez ggwpez added this pull request to the merge queue Mar 5, 2024
Merged via the queue into master with commit 329c077 Mar 5, 2024
129 of 130 checks passed
@ggwpez ggwpez deleted the oty-fix-mq-pages branch March 5, 2024 17:55
bgallois pushed a commit to duniter/duniter-polkadot-sdk that referenced this pull request Mar 25, 2024
Changes:
- `QueueFootprint` gets a new field; `ready_pages` that contains the
non-overweight and not yet processed pages.
- `XCMP` queue pallet is change to use the `ready_pages` instead of
`pages` to calculate the channel suspension thresholds.

This should give the XCMP queue pallet a more correct view of when to
suspend channels.

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
T2-pallets This PR/Issue is related to a particular pallet.
Projects
Status: Audited
Development

Successfully merging this pull request may close these issues.

4 participants