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

[6.6]Hygon: CSV3 patch series part 4 (Enable the concurrent memory allocation of CMA for Hygon CSV3) #401

Merged
merged 2 commits into from
Sep 4, 2024

Conversation

wojiaohanliyang
Copy link

Add member to control CMA's concurrent allocation:

mm/cma: add API to enable concurrent allocation from the CMA

Enable CMA's concurrent allocation when allocate CSV3 guest's mem from CMA:

x86/mm: CSV allows CMA allocation concurrently

Xin Jiang added 2 commits September 3, 2024 19:59
hygon inclusion
category: feature
CVE: NA

---------------------------

The mutex prevents allocating CMA memory concurently, and it's
removed and reverted back and forth, refer to commit 60a60e3
("Revert "mm/cma.c: remove redundant cma_mutex lock"") and commit
a4efc17 ("mm/cma.c: remove redundant cma_mutex lock") in
the upstream.

To solve the awkward dilemma, an API to enable concurrency is added,
it's up to user to decide whether their CMA can handle concurrent
allocations.

Signed-off-by: Yangwencheng <yangwencheng@hygon.cn>
Signed-off-by: Xin Jiang <jiangxin@hygon.cn>
Signed-off-by: hanliyang <hanliyang@hygon.cn>
hygon inclusion
category: feature
CVE: NA

---------------------------

CSV allows CMA allocation concurrently.

Signed-off-by: Yangwencheng <yangwencheng@hygon.cn>
Signed-off-by: Xin Jiang <jiangxin@hygon.cn>
Signed-off-by: hanliyang <hanliyang@hygon.cn>
@deepin-ci-robot
Copy link

Hi @wojiaohanliyang. Thanks for your PR.

I'm waiting for a deepin-community member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign opsiff for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@opsiff
Copy link
Member

opsiff commented Sep 4, 2024

注: cma结构体有memset初始化填为0 所以不需要添加初始化为0的逻辑
cma_areas=data=memblock_alloc
->memblock_alloc
->memblock_alloc_try_nid
->memblock_alloc_internal
->memset(ptr, 0, size);

@opsiff
Copy link
Member

opsiff commented Sep 4, 2024

/lgtm

@opsiff opsiff merged commit f899cdf into deepin-community:linux-6.6.y Sep 4, 2024
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants