Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Simplify the memory pool arbitration process management #10705

Closed
wants to merge 1 commit into from

Conversation

xiaoxmeng
Copy link
Contributor

@xiaoxmeng xiaoxmeng commented Aug 10, 2024

Move memory arbitration context setting from shared arbitrator to memory pool and pass the
root memory pool to memory arbitrator directly to simplify the the arbitrator backend implementation.
The memory pool handles the memory arbitration context setting and grow the capacity with the
memory arbitrator directly.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 10, 2024
Copy link

netlify bot commented Aug 10, 2024

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit d5c1f43
🔍 Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/66b98dca4aba3e0008717ecc

@xiaoxmeng xiaoxmeng force-pushed the simple branch 4 times, most recently from 95a65dc to 43eadab Compare August 10, 2024 12:22
@xiaoxmeng xiaoxmeng marked this pull request as ready for review August 10, 2024 12:23
@facebook-github-bot
Copy link
Contributor

@xiaoxmeng has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@tanjialiang
Copy link
Contributor

Title -> s/Simply/Simplify/

@@ -165,7 +165,6 @@ class SharedArbitrator : public memory::MemoryArbitrator {
// Contains the execution state of an arbitration operation.
struct ArbitrationOperation {
MemoryPool* const requestPool;
MemoryPool* const requestRoot;
Copy link
Contributor

@tanjialiang tanjialiang Aug 11, 2024

Choose a reason for hiding this comment

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

Should we keep the name requestRoot instead of requestPool? Will be more intuitive and provides better readability

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The request root is named to be different than the leaf pool. Now we always initiate from a root memory pool so we don't need to name it as root.

@@ -425,6 +425,18 @@ class ScopedMemoryArbitrationContext {
MemoryArbitrationContext currentArbitrationCtx_;
};

/// Object used to setup memory arbitration context for a leaf memory pool.
class ScopedMemoryArbitration {
Copy link
Contributor

Choose a reason for hiding this comment

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

Looking together with the above class, plus a scoped class containing another scoped class, it is quite confusing. Can we remove ScopedMemoryArbitrationContext class and put the impl of it inside of ScopedMemoryArbitration class?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Chat offline. They are different.

@xiaoxmeng xiaoxmeng changed the title Simply the memory pool arbitration process management Simplify the memory pool arbitration process management Aug 11, 2024
@facebook-github-bot
Copy link
Contributor

@xiaoxmeng has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D61063144

xiaoxmeng added a commit to xiaoxmeng/velox that referenced this pull request Aug 11, 2024
…bator#10705)

Summary:
Move memory arbitration context setting from shared arbitrator to memory pool and pass the
root memory pool to memory arbitrator directly to simplify the the arbitrator backend implementation.
The memory pool handles the memory arbitration context setting and grow the capacity with the
memory arbitrator directly.

Pull Request resolved: facebookincubator#10705

Reviewed By: tanjialiang

Differential Revision: D61063144

Pulled By: xiaoxmeng
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D61063144

xiaoxmeng added a commit to xiaoxmeng/velox that referenced this pull request Aug 12, 2024
…bator#10705)

Summary:
Move memory arbitration context setting from shared arbitrator to memory pool and pass the
root memory pool to memory arbitrator directly to simplify the the arbitrator backend implementation.
The memory pool handles the memory arbitration context setting and grow the capacity with the
memory arbitrator directly.

Pull Request resolved: facebookincubator#10705

Reviewed By: tanjialiang

Differential Revision: D61063144

Pulled By: xiaoxmeng
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D61063144

xiaoxmeng added a commit to xiaoxmeng/velox that referenced this pull request Aug 12, 2024
…bator#10705)

Summary:
Move memory arbitration context setting from shared arbitrator to memory pool and pass the
root memory pool to memory arbitrator directly to simplify the the arbitrator backend implementation.
The memory pool handles the memory arbitration context setting and grow the capacity with the
memory arbitrator directly.

Pull Request resolved: facebookincubator#10705

Reviewed By: tanjialiang

Differential Revision: D61063144

Pulled By: xiaoxmeng
xiaoxmeng added a commit to xiaoxmeng/velox that referenced this pull request Aug 12, 2024
…bator#10705)

Summary:
Move memory arbitration context setting from shared arbitrator to memory pool and pass the
root memory pool to memory arbitrator directly to simplify the the arbitrator backend implementation.
The memory pool handles the memory arbitration context setting and grow the capacity with the
memory arbitrator directly.

Pull Request resolved: facebookincubator#10705

Reviewed By: tanjialiang

Differential Revision: D61063144

Pulled By: xiaoxmeng
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D61063144

…bator#10705)

Summary:
Move memory arbitration context setting from shared arbitrator to memory pool and pass the
root memory pool to memory arbitrator directly to simplify the the arbitrator backend implementation.
The memory pool handles the memory arbitration context setting and grow the capacity with the
memory arbitrator directly.

Pull Request resolved: facebookincubator#10705

Reviewed By: tanjialiang

Differential Revision: D61063144

Pulled By: xiaoxmeng
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D61063144

@facebook-github-bot
Copy link
Contributor

@xiaoxmeng merged this pull request in 5f32870.

Copy link

Conbench analyzed the 1 benchmark run on commit 5f32870e.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details.

@zhouyuan
Copy link
Contributor

CC @zhztheplayer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants