/ 详情

openEuler-20.03] mm/page_alloc: fix managed_pages of zones incorrect

Done
Task member
Opened this issue  
2021-05-15 15:43

Commit eb761d6521c3 ("mm: parallelize deferred struct page initialization
within each node") the code "++zone" in follow code:
/* Sanity check that the next zone really is unpopulated */
WARN_ON(++zid < MAX_NR_ZONES && populated_zone(++zone));
VM_BUG_ON(nr_init != nr_free);

zone->managed_pages += nr_free;

makes the managed_pages statistics of the current zone incorrect
and the zone may have out-of-bounds memory when
CONFIG_DEFERRED_STRUCT_PAGE_INIT=y, causing the Virtual machine
system startup to fail when the Virtual machine system current
allocated memory is set to half of the Virtual machine
maximum memory using virt-manager tool

Fix it by putting the code “zone->managed_pages += nr_free;”
before “++zone” code

Fixes: eb761d6521c3 ("mm: parallelize deferred struct page initialization
within each node")

Attachments

Comments (3)

Hey gatieme, Welcome to openEuler Community.
All of the projects in openEuler Community are maintained by @openeuler-ci-bot .
That means the developers can comment below every pull request or issue to trigger Bot Commands.
Please follow instructions at https://gitee.com/openeuler/community/blob/master/en/sig-infrastructure/command.md to find the details.

成坚 (CHENG Jian) created任务
成坚 (CHENG Jian) set related repository to openEuler/kernel
展开全部操作日志
分支 commit tag
openEuler-1.0-LTS ce4cce2f893ab555ba8009bc1ba9394582428342 openEuler-1.0-LTS
kernel-4.19 66dfb5b15d502a7c5fee251abc5945df4a6ec5cc kernel-4.19

@a_372048518 补丁已经合入 openEuler-20.03

谢谢贡献

openEuler 有你更精彩。

成坚 (CHENG Jian) changed issue state from 待办的 to 已完成
成坚 (CHENG Jian) changed issue state from 已完成 to 待办的
成坚 (CHENG Jian) changed issue state from 待办的 to 进行中
成坚 (CHENG Jian) changed issue state from 进行中 to 已完成
成坚 (CHENG Jian) translation missing: en.project.new_issues_operate_log.link_issue(Normal)[openEuler-20.03-SP1/x86] update0628 出现pthread、fork系统调用性能下降问题

Sign in to comment

状态
Assignees
Projects
Milestones
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
Branches
Planed to start   -   Planed to end
-
Top level
Priority
Duration (hours)
确定
参与者(2)
5329419 openeuler ci bot 1578984659