提交 b861c9ed 编写于 作者: K Kemeng Shi 提交者: Zheng Zengkai

etmem: add ioctl for mm idle scan

euleros inclusion
category: feature
feature: etmem
bugzilla: https://gitee.com/openeuler/kernel/issues/I4OODH?from=project-issue
CVE: NA

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

support ioctl for etmem scan to set scan flag
Signed-off-by: NKemeng Shi <shikemeng@huawei.com>
Reviewed-by: Nlouhongxiang <louhongxiang@huawei.com>
Reviewed-by: NChen Wandun <chenwandun@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 62c4d887
......@@ -1890,11 +1890,20 @@ static int mm_idle_release(struct inode *inode, struct file *file)
return 0;
}
static long mm_idle_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
{
if (proc_page_scan_operations.unlocked_ioctl)
return proc_page_scan_operations.unlocked_ioctl(filp, cmd, arg);
return 0;
}
const struct file_operations proc_mm_idle_operations = {
.llseek = mem_lseek, /* borrow this */
.read = mm_idle_read,
.open = mm_idle_open,
.release = mm_idle_release,
.unlocked_ioctl = mm_idle_ioctl,
};
/*swap pages*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册