426 Star 1.5K Fork 1.6K

GVPopenEuler/kernel

 / 详情

[OLK-5.10] add a bulk page allocator

已完成
任务 成员
创建于  
2021-07-09 11:02

This patch adds a new page allocator interface via alloc_pages_bulk, and
__alloc_pages_bulk_nodemask. A caller requests a number of pages to be
allocated and added to a list.

The API is not guaranteed to return the requested number of pages and
may fail if the preferred allocation zone has limited free memory, the
cpuset changes during the allocation or page debugging decides to fail
an allocation. It's up to the caller to request more pages in batch if
necessary.

Note that this implementation is not very efficient and could be
improved but it would require refactoring. The intent is to make it
available early to determine what semantics are required by different
callers. Once the full semantics are nailed down, it can be refactored.

评论 (2)

刘勇强 创建了任务 4年前
刘勇强 关联仓库设置为openEuler/kernel 4年前
展开全部操作日志
openeuler-ci-bot 添加了
 
sig/Kernel
标签
4年前
成坚 (CHENG Jian) 修改了描述 4年前
成坚 (CHENG Jian) 修改了标题 4年前

来自主线新的相关bugfix补丁:
mm/page_alloc: avoid page allocator recursion with pagesets.lock held

mainline inclusion
from mainline-5.14-rc2
commit 187ad460b8413e863c951998cb321a117a717868

该补丁主要是修复在page_owner打开时导致死锁的问题,因为打开page_owner时会在set_page_owner之后获取同一个锁,虽然引入死锁bug的补丁 dbbee9d5cd83 ("mm/page_alloc: convert per-cpu list protection to local_lock)并未合入,但出现了重复关闭中断的问题以及关了中断会调用可能会睡眠的函数的问题,因此建议合入该补丁。合入该补丁后在打开page_onwer之后将使用普通alloc_pages接口分配内存,主线正在讨论开启page_owner之后正常使用alloc_pages_bulk的特性。等稳定之后将回合。

mm/page_alloc: correct return value when failing at preparing

mainline inclusion
from mainline-5.14-rc2
commit e5c15cea339115edf99dc92282865f173cf84510

该补丁主要修了一个返回值错误的问题。

mm/page_alloc: further fix __alloc_pages_bulk() return value

mainline inclusion
from mainline-5.14-rc2
commit 061478438d04779181c2ce4d7ffeeca343a70a98

该补丁主要是做了一个clean up。将相同的错误返回值放到固定位置并使用goto,便于后续bug fix的合入。

zhengzengkai 关联分支设置为openEuler-21.09 4年前
zhengzengkai 通过合并 Pull Request !306: release 5.10.0-5.9.0任务状态待办的 修改为已完成 4年前

登录 后才可以发表评论

状态
负责人
项目
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
预计工期 (小时)
开始日期   -   截止日期
-
置顶选项
优先级
分支
参与者(2)
5329419 openeuler ci bot 1632792936 刘勇强-LiuYongQiang0816
C
1
https://gitee.com/openeuler/kernel.git
git@gitee.com:openeuler/kernel.git
openeuler
kernel
kernel

搜索帮助