Forum Search:
OpenVZ Forum
Members
Search
Help
Register
Login
Home
Home
»
Mailing lists
»
Devel
»
[PATCH v8 0/9] per-cgroup tcp memory pressure controls
Show:
Today's Messages
::
Show Polls
::
Message Navigator
E-mail to friend
RE: [PATCH v8 1/9] Basic kernel memory functionality for the Memory Controller
[
message #44615
is a reply to
message #44475
]
Fri, 09 December 2011 14:44
David Laight
Messages:
3
Registered:
December 2011
Junior Member
> How about this?
>
> val = !!val;
>
> /*
> * This follows the same hierarchy restrictions than
> * mem_cgroup_hierarchy_write()
> */
> if (!parent || !parent->use_hierarchy) {
> if (list_empty(&cgroup->children))
> memcg->kmem_independent_accounting = val;
> else
> return -EBUSY;
> }
> else
> return -EINVAL;
>
> return 0;
Inverting the tests gives easier to read code:
if (parent && parent->user_hierarchy)
return -EINVAL;
if (!list_empty(&cgroup->children))
return -EBUSY;
memcg->kmem_independent_accounting = val != 0;
return 0;
NFI about the logic...
On the face of it the tests don't seem related to each other
or to the assignment!
David
Report message to a moderator
[
Message index
]
[PATCH v8 0/9] per-cgroup tcp memory pressure controls
By:
Glauber Costa
on Mon, 05 December 2011 21:34
[PATCH v8 2/9] foundations of per-cgroup memory pressure controlling.
By:
Glauber Costa
on Mon, 05 December 2011 21:34
Re: [PATCH v8 2/9] foundations of per-cgroup memory pressure controlling.
By:
KAMEZAWA Hiroyuki
on Fri, 09 December 2011 01:24
Re: [PATCH v8 2/9] foundations of per-cgroup memory pressure controlling.
By:
Glauber Costa
on Fri, 09 December 2011 12:41
[PATCH v8 1/9] Basic kernel memory functionality for the Memory Controller
By:
Glauber Costa
on Mon, 05 December 2011 21:34
Re: [PATCH v8 1/9] Basic kernel memory functionality for the Memory Controller
By:
KAMEZAWA Hiroyuki
on Fri, 09 December 2011 01:21
Re: [PATCH v8 1/9] Basic kernel memory functionality for the Memory Controller
By:
Glauber Costa
on Fri, 09 December 2011 12:40
Re: [PATCH v8 1/9] Basic kernel memory functionality for the Memory Controller
By:
Glauber Costa
on Fri, 09 December 2011 14:37
Re: [PATCH v8 1/9] Basic kernel memory functionality for the Memory Controller
By:
KAMEZAWA Hiroyuki
on Mon, 12 December 2011 00:34
RE: [PATCH v8 1/9] Basic kernel memory functionality for the Memory Controller
By:
David Laight
on Fri, 09 December 2011 14:44
Re: [PATCH v8 1/9] Basic kernel memory functionality for the Memory Controller
By:
Glauber Costa
on Fri, 09 December 2011 14:48
[PATCH v8 3/9] socket: initial cgroup code.
By:
Glauber Costa
on Mon, 05 December 2011 21:34
Re: [PATCH v8 3/9] socket: initial cgroup code.
By:
KAMEZAWA Hiroyuki
on Fri, 09 December 2011 01:49
Re: [PATCH v8 3/9] socket: initial cgroup code.
By:
KAMEZAWA Hiroyuki
on Fri, 09 December 2011 02:05
Re: [PATCH v8 3/9] socket: initial cgroup code.
By:
Glauber Costa
on Fri, 09 December 2011 12:43
Re: [PATCH v8 3/9] socket: initial cgroup code.
By:
KAMEZAWA Hiroyuki
on Mon, 12 December 2011 00:33
[PATCH v8 5/9] per-netns ipv4 sysctl_tcp_mem
By:
Glauber Costa
on Mon, 05 December 2011 21:34
Re: [PATCH v8 5/9] per-netns ipv4 sysctl_tcp_mem
By:
KAMEZAWA Hiroyuki
on Fri, 09 December 2011 01:54
[PATCH v8 6/9] tcp buffer limitation: per-cgroup limit
By:
Glauber Costa
on Mon, 05 December 2011 21:35
Re: [PATCH v8 6/9] tcp buffer limitation: per-cgroup limit
By:
KAMEZAWA Hiroyuki
on Fri, 09 December 2011 01:55
[PATCH v8 7/9] Display current tcp memory allocation in kmem cgroup
By:
Glauber Costa
on Mon, 05 December 2011 21:35
Re: [PATCH v8 7/9] Display current tcp memory allocation in kmem cgroup
By:
KAMEZAWA Hiroyuki
on Fri, 09 December 2011 01:56
[PATCH v8 8/9] Display current tcp failcnt in kmem cgroup
By:
Glauber Costa
on Mon, 05 December 2011 21:35
[PATCH v8 9/9] Display maximum tcp memory allocation in kmem cgroup
By:
Glauber Costa
on Mon, 05 December 2011 21:35
Re: [PATCH v8 9/9] Display maximum tcp memory allocation in kmem cgroup
By:
KAMEZAWA Hiroyuki
on Fri, 09 December 2011 01:57
[PATCH v8 4/9] tcp memory pressure controls
By:
Glauber Costa
on Mon, 05 December 2011 21:34
Re: [PATCH v8 4/9] tcp memory pressure controls
By:
KAMEZAWA Hiroyuki
on Fri, 09 December 2011 01:51
Re: [PATCH v8 0/9] per-cgroup tcp memory pressure controls
By:
Glauber Costa
on Wed, 07 December 2011 11:06
Re: [PATCH v8 0/9] per-cgroup tcp memory pressure controls
By:
KAMEZAWA Hiroyuki
on Fri, 09 December 2011 01:04
Previous Topic:
Re: [PATCH] make clone_children a flag
Next Topic:
How to draw values for /proc/stat
Goto Forum:
- General
Virtuozzo 7 Beta Program
Support
HowTo
Discussions
- Mailing lists
Users
Devel
- International
German
French
Russian
- Test
TestForum
ml-test
-=]
Back to Top
[=-
[
Syndicate this forum (XML)
] [
] [
]
Current Time:
Fri Aug 01 21:21:59 GMT 2025
Total time taken to generate the page: 1.07761 seconds