Bug 1384504 - [libcgroup] cgset should return fail when set memory.memsw.limit_in_bytes lower than memory.limit_in_bytes
Summary: [libcgroup] cgset should return fail when set memory.memsw.limit_in_bytes low...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: libcgroup
Version: rawhide
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Nikola Forró
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-13 12:27 UTC by Nikola Forró
Modified: 2016-10-13 12:59 UTC (History)
5 users (show)

Fixed In Version: libcgroup-0.41-10.fc26
Doc Type: Bug Fix
Doc Text:
Clone Of: 1384390
Environment:
Last Closed: 2016-10-13 12:59:49 UTC
Type: Bug


Attachments (Terms of Use)
Preserve dirty flag when copying controller values (1.04 KB, patch)
2016-10-13 12:31 UTC, Nikola Forró
no flags Details | Diff

Description Nikola Forró 2016-10-13 12:27:54 UTC
+++ This bug was initially created as a clone of Bug #1384390 +++

# cgdelete -g memory:eatmem
# cgcreate -g memory:eatmem
# cgset -r memory.memsw.limit_in_bytes=15M eatmem
# echo $?
0
<===== cgset returned 0 here
# cgget -g memory:eatmem | grep -e memory.limit_in_bytes -e memory.memsw.limit_in_bytes
memory.limit_in_bytes: 9223372036854771712
memory.memsw.limit_in_bytes: 9223372036854771712
# cgset -r memory.limit_in_bytes=15M eatmem
# cgget -g memory:eatmem | grep -e memory.limit_in_bytes -e memory.memsw.limit_in_bytes
memory.limit_in_bytes: 15728640
memory.memsw.limit_in_bytes: 9223372036854771712

# cgdelete -g memory:eatmem
# cgcreate -g memory:eatmem
# echo 15728640 > /sys/fs/cgroup/memory/eatmem/memory.memsw.limit_in_bytes
-bash: echo: write error: Invalid argument
<===== Directly use echo return fail
# echo 15728640 > /sys/fs/cgroup/memory/eatmem/memory.limit_in_bytes
# echo 15728640 > /sys/fs/cgroup/memory/eatmem/memory.memsw.limit_in_bytes
# echo $?
0

Comment 1 Nikola Forró 2016-10-13 12:31:42 UTC
Created attachment 1210053 [details]
Preserve dirty flag when copying controller values


Note You need to log in before you can comment on or make changes to this bug.