Commit 87056bf2 authored by Binder Makin's avatar Binder Makin Committed by Zheng Zengkai
Browse files

cgroups: Resource controller for open files

hulk inclusion
category: feature/cgroups
bugzilla: 50779
CVE: NA

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

Add a lockless resource controller for limiting the number of open
file handles.  This allows us to catch misbehaving processes
and return EMFILE instead of ENOMEM for kernel memory limits.

Original link: https://lwn.net/Articles/604129/.After introduced
https://gitlab.indel.ch/thirdparty/linux-indel/commit


/5b1efc02.
All memory accounting and limiting has been switched over to the
lockless page counters. So we convert original resource counters to
lockless page counters.

Signed-off-by: default avatarBinder Makin <merimus@google.com>
Reviewed-by: default avatarQiang Huang <h.huangqiang@huawei.com>
[cm: convert to lockless page counters]

Signed-off-by: default avatarluojiajun <luojiajun3@huawei.com>

v1->v2
fix some code
Reviewed-by: default avatarJason Yan <yanaijie@huawei.com>

Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>

Signed-off-by: default avatarLu Jialin <lujialin4@huawei.com>
Reviewed-by: default avatarXiu Jianfeng <xiujianfeng@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 7f4f4c41
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment