Bug 24405 - Improve concurrent allocation performance for CSV3 virtual machine
Summary: Improve concurrent allocation performance for CSV3 virtual machine
Status: NEW
Alias: None
Product: ANCK 5.10 Dev
Classification: ANCK
Component: mm (show other bugs) mm
Version: unspecified
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: baolinwang
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-09-02 14:09 UTC by yangge
Modified: 2025-09-02 14:58 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yangge hygon_group 2025-09-02 14:09:29 UTC
Description of problem:
1, Revert commit bf06164cafb1 ("anolis: mm: hugetlb: wait hugetlb pages to be released to buddy allocator") and commit 1b4d4cce1b1a ("anolis: mm: release hugetlb pages to buddy allocator after migrate them").

Using upstream commit 04f13d241b8b ("mm: replace free hugepage folios after migration") and commit 67bab13307c8 ("mm/hugetlb: wait for hugetlb folios to be freed") can also fix the bug in hugetlb page migration and improve migration performance.

2, Currently, when starting a csv3 virtual machine, the function csv_alloc_from_contiguous() is called to allocate memory, starting from csv_cma[0], then csv_cma[1], and so on in sequence. When multiple csv3 virtual machines are started concurrently, this easily causes contention on the same csv_cma, which affects performance. 

It is necessary to adjust the logic so that each time the csv_alloc_from_contiguous() function is called for memory allocation, it allocates from the csv_cma that follows the one used in the previous allocation. This adjustment can significantly improve performance.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Comment 1 小龙 admin 2025-09-02 14:58:38 UTC
The PR Link: https://gitee.com/anolis/cloud-kernel/pulls/5709