Skip to content

RFC introduce rlimit cgroup

Hirofumi Nakagawa lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3rlimit cgroupinclude/linux/cgroup_subsys.h init/Kconfig kernel/Makefile +1 more+193 -00 replies
2/3move lnames from fs/proc/base.c to include/linux/resource.hfs/proc/base.c include/linux/resource.h+24 -240 replies
3/3restructure sys_setrlimitinclude/linux/resource.h kernel/sys.c+34 -240 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC][PATCH][0/3] introduce rlimit cgroup

Hello,

I think existing rlimit interface isn't useful.
So I created rlimit interface on cgroup.
Do you think this is a proper way todo it? (or Is there any similar methods already?)

usage
=======================================

# mkdir /dev/cgroup
# mount -t cgroup -o rlimit none /dev/cgroup
# ls /dev/cgroup
notify_on_release  release_agent  rlimit.limits  tasks
# cat /dev/cgroup/rlimit.limits
Number  Limit                  Soft Limit       Hard Limit       Unit
0       Max cpu time           unlimited        unlimited         ms
1       Max file size          unlimited        unlimited         bytes
2       Max data size          unlimited        unlimited         bytes
3       Max stack size         8388608          unlimited         bytes
4       Max core file size     0                unlimited         bytes
5       Max resident set       unlimited        unlimited         bytes
6       Max processes          16300            16300             processes
7       Max open files         1024             1024              files
8       Max locked memory      32768            32768             bytes
9       Max address space      unlimited        unlimited         bytes
10      Max file locks         unlimited        unlimited         locks
11      Max pending signals    16300            16300             signals
12      Max msgqueue size      819200           819200           bytes
13      Max nice priority       0                0
14      Max realtime priority   0                0
15      Max realtime timeout    unlimited        unlimited        us
# echo "1 100000000 200000000" > /dev/cgroup/rlimit.limits
# cat /proc/zero > /tmp/hoge
[1]    2854 file size limit exceeded  cat /dev/zero > /tmp/hoge