is alerting the
subsystem that the association changed during a fork.
--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo
because it has either weird side effects
(b) or is just an odd feature (a).
--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo
Hi Tejun,
You can charge the parent's at can_attach(), remember which one you
charged, and at post_fork() if the parent's has changed inbetween, fix
it up. [...]
Did you mean can_fork() instead of can_attach() here?
--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from this list
inside a cgroup without hitting any reasonable kmemcg
policy. Once you've hit PID exhaustion, you're only in a marginally
better state than OOM. This subsystem allows PID exhaustion inside a
cgroup to be prevented.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
include/linux/cgroup_subsys.h
it to the right hierarchy using the
reapply_fork callback. Since a changing current css_set in
copy_process indicates an organisation operation took place, we can
break the cgroup policy in this case.
This is in preparation for implementing the pids cgroup subsystem.
Signed-off-by: Aleksa Sarai cyp
Add a new macro for_each_subsys_which that allows all enabled cgroup
subsystems to be filtered by a bitmask, such that mask (1 ssid)
determines if the subsystem is to be processed in the loop body (where
ssid is the unique id of the subsystem).
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
hit PID exhaustion, you're only in a marginally
better state than OOM. This subsystem allows PID exhaustion inside a
cgroup to be prevented.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
include/linux/cgroup_subsys.h | 4 +
init/Kconfig | 11 ++
kernel/Makefile
an opaque pointer between cgroup_*_fork(), which holds the
current task css_set. The css_set is pinned by bumping the refcount
in cgroup_can_fork() and later unpinned in
cgroup_{cancel,post}_fork().
* A whole bunch of userland API and stylistic fixes.
Aleksa Sarai (3):
cgroups: use
Hello Tejun,
On Wed, Mar 11, 2015 at 2:17 AM, Tejun Heo t...@kernel.org wrote:
On Wed, Mar 11, 2015 at 01:51:06AM +1100, Aleksa Sarai wrote:
Actually, I'm fairly sure we can do it all inside cgroup_post_fork() because
inside cgroup_post_fork() we have access to both the old css_set and the new
the charge to the
hierarchies.
I'll send a patch in a few days, I need to make sure that this method
*actually* works. :P
--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More
/2015/3/4/1198
Aleksa Sarai (2):
cgroups: allow a cgroup subsystem to reject a fork
cgroups: add a pids subsystem
include/linux/cgroup.h| 9 ++
include/linux/cgroup_subsys.h | 4 +
init/Kconfig | 11 ++
kernel/Makefile | 1 +
kernel/cgroup.c
it belongs).
This is in preparation for implementing the pids cgroup subsystem.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
include/linux/cgroup.h | 9 ++
kernel/cgroup.c| 82 --
kernel/fork.c | 12 +++-
3 files changed
and the pids
cgroup controller are orthogonal features, why should they be able to affect
each other (or even be aware of each other)?
--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More
a certain `css` (unless we start
passing `css_set`s to the fork/exit callbacks -- and then we can uncharge the
old css_set and charge the new one).
--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord
actually get per-cgroup process limiting merged
first, then deal with such features separately.
--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http
a
cgroup to be prevented.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
include/linux/cgroup_subsys.h | 4 +
init/Kconfig | 16 +++
kernel/Makefile | 1 +
kernel/cgroup_pids.c | 310 ++
4 files changed, 331
Replace the explicit checking against ss_masks inside a for_each_subsys
block with for_each_subsys_which(ss_mask, ...), to take advantage of the
more readable macro.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
kernel/cgroup.c | 42 ++
1 file changed
to be enforced prematurely due to residual charges on the pid
counter. This is done by adding a detach() callback that alerts a
subsystem to a task detaching from it.
[1]: https://lkml.org/lkml/2015/3/14/2
Aleksa Sarai (4):
cgroups: use bitmask to filter for_each_subsys
cgroups: replace
Add a new macro for_each_subsys_which that allows all enabled cgroup
subsystems to be filtered by a bitmask, such that mask (1 ssid)
determines if the subsystem is to be processed in the loop body (where
ssid is the unique id of the subsystem).
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
for no good reason).
If you *really* want the other one, I can send it.
--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo
to another hierarchy, add a detach callback
to the subsystem which is run after the migration has been confirmed but
before the old_cset's refcount is dropped.
This is in preparation for implementing the pids cgroup subsystem.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
include/linux/cgroup.h
://lkml.org/lkml/2015/3/31/1058
Aleksa Sarai (4):
cgroups: use bitmask to filter for_each_subsys
cgroups: replace explicit ss_mask checking with for_each_subsys_which
cgroups: allow a cgroup subsystem to reject a fork
cgroups: implement the PIDs subsystem
include/linux/cgroup.h| 35
subsystem.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
include/linux/cgroup.h | 35 +++--
kernel/cgroup.c | 133
kernel/cgroup_freezer.c | 2 +-
kernel/fork.c | 31 +--
kernel/sched/core.c | 2 +-
5
separate bitmasks for
each callback to make (ss-{fork,exit}) checks unnecessary.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
kernel/cgroup.c | 43 ++-
1 file changed, 26 insertions(+), 17 deletions(-)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
Replace the explicit checking against ss_masks inside a for_each_subsys
block with for_each_subsys_which(ss_mask, ...), to take advantage of the
more readable macro.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
kernel/cgroup.c | 42 ++
1 file changed
a
cgroup to be prevented.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
include/linux/cgroup_subsys.h | 4 +
init/Kconfig | 16 ++
kernel/Makefile | 1 +
kernel/cgroup_pids.c | 367 ++
4 files changed, 388
the SYSRQ dance.
--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
PIDs a
resource.
--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
it belongs).
This is in preparation for implementing the pids cgroup subsystem.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
include/linux/cgroup.h | 9 ++
kernel/cgroup.c| 80 +++---
kernel/fork.c | 12 +++-
3 files changed
inside a cgroup without hitting any reasonable kmemcg
policy. Once you've hit PID exhaustion, you're only in a marginally
better state than OOM. This subsystem allows PID exhaustion inside a
cgroup to be prevented.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
include/linux/cgroup_subsys.h
was renamed to `pids`.
[1]: https://lkml.org/lkml/2015/2/26/787
[2]: https://lkml.org/lkml/2015/3/2/437
Aleksa Sarai (2):
cgroups: allow a cgroup subsystem to reject a fork
cgroups: add a pids subsystem
include/linux/cgroup.h| 9 ++
include/linux/cgroup_subsys.h | 4 +
init/Kconfig
+ depends on PAGE_COUNTER
Whoops. I forgot to remove this line. Should I submit a revised
patchset or can you just change the patch?
--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord
a cgroup, allowing for cgroups to perform fairly basic resource
limitation which it currently doesn't have the capability to do.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
include/linux/cgroup_subsys.h | 4 +
init/Kconfig | 10 +++
kernel/Makefile | 1 +
kernel
to do such
rudimentary resource management (which currently only exists for process
trees).
Aleksa Sarai (2):
cgroups: allow a cgroup subsystem to reject a fork
cgroups: add an nproc subsystem
include/linux/cgroup.h| 9 ++-
include/linux/cgroup_subsys.h | 4 +
init/Kconfig
--
Make the cgroup subsystem post fork callback return an error code so
that subsystems can accept or reject a fork from completing with a
custom error value.
This is in preparation for implementing the numtasks cgroup scope.
Signed-off-by: Aleksa Sarai cyp
a cgroup, allowing for cgroups to perform fairly basic resource
limitation which it currently doesn't have the capability to do.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
include/linux/cgroup_subsys.h | 4 +
init/Kconfig | 10 +++
kernel/Makefile | 1 +
kernel
is exposed (which is when fork) is called, and cancel_fork
is run during the cleanup of copy_process if the fork fails due to other
reasons.
[1]: https://lkml.org/lkml/2015/2/22/204
Aleksa Sarai (2):
cgroups: allow a cgroup subsystem to reject a fork
cgroups: add an nproc subsystem
include/linux
it belongs).
This is in preparation for implementing the nproc cgroup subsystem.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
include/linux/cgroup.h | 9 ++
kernel/cgroup.c| 80 +++---
kernel/fork.c | 12 +++-
3 files changed
. If a subsys doesn't have pre, it's
NULL. I don't see anything weird about that, so let's please go that
way.
Alright, if you think that's the best way. I still think it's weird, but I
guess that's probably just down to personal taste.
--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from
use INT_MAX for now.
3. Please FWD this discussion to the mailing lists with a summary.
--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org
association.
--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
IMO this should be done in a separate patchset [if at all]). Also, your
later comments would fix the subsys bitmask problem (we can just pass the
default %NULL), we don't even need to test the index.
--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from this list: send the line unsubscribe
() does. I can remove the
UNUSED_IDENT() if you want, that was just to make sure you don't get clashes
with other unused idents. COUNT() is so that we don't have to manually add
CGROUP_TAG_COUNT for every tag we add.
--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from this list: send
for CGROUP_TAG
enumerations to be be defined and used (as well as CGROUP_TAG_COUNT).
This is in preparation for implementing the pids cgroup subsystem.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
include/linux/cgroup.h| 47 +-
include/linux/cgroup_subsys.h | 27
a
cgroup to be prevented.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
include/linux/cgroup_subsys.h | 5 +
init/Kconfig | 16 ++
kernel/Makefile | 1 +
kernel/cgroup_pids.c | 368 ++
4 files changed, 390
Replace the explicit checking against ss_masks inside a for_each_subsys
block with for_each_subsys_which(ss_mask, ...), to take advantage of the
more readable macro.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
kernel/cgroup.c | 42 ++
1 file changed
separate bitmasks for
each callback to make (ss-{fork,exit}) checks unnecessary.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
kernel/cgroup.c | 43 ++-
1 file changed, 26 insertions(+), 17 deletions(-)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
UNUSED_IDENT()
magic) and not use __COUNTER__.
* Removed the SUBSYS_TAG_COUNT macro and replaced it with a hard-coded
CGROUP_PREFORK_COUNT macro.
[1]: https://lkml.org/lkml/2015/4/11/237
Aleksa Sarai (4):
cgroups: use bitmask to filter for_each_subsys
cgroups: replace explicit ss_mask
a ref on a
css_set give you an implicit ref on a css inside that css_set, or are
those two orthogonal operations?
--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info
this in the comments
if you want.
--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org
the task is being migrated away
from is and just uncharge that inside -can_attach.
On the same point, are all the tasks in a tset passed to -can_attach
guaranteed to have the same css? Or do I have to uncharge each one
individually?
--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from
naive solution?
--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
as the maximum valid value).
--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
up a whole bunch of comments that were too pids-specific or not
explicit enough.
[1]: https://lkml.org/lkml/2015/4/19/39
[2]: http://lkml.kernel.org/g/1428350318-8215-8-git-send-email...@kernel.org
Aleksa Sarai (6):
cgroup: switch to unsigned long for bitmasks
cgroup: use bitmask to filter
separate bitmasks for
each callback to make (ss-{fork,exit}) checks unnecessary.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
kernel/cgroup.c | 46 +-
1 file changed, 29 insertions(+), 17 deletions(-)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
Hi Tejun,
One question RE: defaults for .config. What is the kernel policy for
deciding if a particular subsystem should be made enabled-by-default?
--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord
Switch the type of all internal cgroup masks to (unsigned long), which
is the correct type for bitmasks. This is in preparation for the
for_each_subsys_which patch.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
kernel/cgroup.c | 39 ---
1 file changed, 20
This patch is in preparation for the pids cgroup subsystem patchset.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
include/linux/cgroup.h | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index e7da0aa
for CGROUP_TAG
enumerations to be be defined and used (as well as CGROUP_TAG_COUNT).
This is in preparation for implementing the pids cgroup subsystem.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
include/linux/cgroup.h| 35 +++--
include/linux/cgroup_subsys.h | 17
From: Tejun Heo t...@kernel.org
bio_associate_current() currently open codes task_css() and
css_tryget_online() to find and pin $current's blkcg css. Abstract it
into task_get_css() which is implemented from cgroup side. As a task
is always associated with an online css for every subsystem
Replace the explicit checking against ss_masks inside a for_each_subsys
block with for_each_subsys_which(..., ss_mask), to take advantage of the
more readable macro.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
kernel/cgroup.c | 44
1 file
a
cgroup to be prevented.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
CREDITS | 5 +
include/linux/cgroup_subsys.h | 5 +
init/Kconfig | 16 ++
kernel/Makefile | 1 +
kernel/cgroup_pids.c | 379
From: Tejun Heo t...@kernel.org
bio_associate_current() currently open codes task_css() and
css_tryget_online() to find and pin $current's blkcg css. Abstract it
into task_get_css() which is implemented from cgroup side. As a task
is always associated with an online css for every subsystem
This is in preparation for implementing the pids cgroup subsystem. It is
not a functional change and should not change any behavior.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
include/linux/cgroup.h | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git
separate bitmasks for
each callback to make (ss-{fork,exit}) checks unnecessary.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
kernel/cgroup.c | 51 +++
1 file changed, 31 insertions(+), 20 deletions(-)
diff --git a/kernel/cgroup.c b/kernel
a
CGROUP_CANFORK_COUNT macro to make arrays easier to define.
This is in preparation for implementing the pids cgroup subsystem.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
include/linux/cgroup.h| 27 --
include/linux/cgroup_subsys.h | 17 +
kernel/cgroup.c | 84
This adds a macro to get the css of a tset (using task_get_css()) by
just grabbing a ref to the first item in the tset (since there is a
guarantee that all tasks in a tset share a css).
This is in preparation for implementing the pids cgroup subsystem.
Signed-off-by: Aleksa Sarai cyp
a
cgroup to be prevented.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
CREDITS | 5 +
include/linux/cgroup_subsys.h | 5 +
init/Kconfig | 16 ++
kernel/Makefile | 1 +
kernel/cgroup_pids.c | 355
This is a small update to v11 of the pids patchset[1], including:
* Fix up (incorrect) commit messages.
* Remove defunct code.
* Modify subsys_canfork_private{,p} signatures to use
(void *[SUBSYS_CANFORK_COUNT]).
[1]: https://lkml.org/lkml/2015/5/16/1
Aleksa Sarai (7):
cgroup: switch
Switch the type of all internal cgroup masks to (unsigned long), which
is the correct type for bitmasks. This is in preparation for the
for_each_subsys_which patch.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
kernel/cgroup.c | 39 ---
1 file changed, 20
Replace the explicit checking against ss_masks inside a for_each_subsys
block with for_each_subsys_which(..., ss_mask), to take advantage of the
more readable macro.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
kernel/cgroup.c | 44
1 file
I just realised I didn't remove a few incorrect comments and some of
the other patches need a small amount of fixing up. I'll send a
corrected patchset in an hour or so.
--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body
, no?
Would you be okay with this?
if (limit 0 || limit = PIDS_MAX)
I'd prefer if we used PIDS_MAX as the maximum input value as well as
being the internal representation of the maximum, rather than
switching to something like INT_MAX.
--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from
if (CGROUP_PREFORK_START = ssid ssid CGROUP_PREFORK_END)
return ss_state[ssid - CGROUP_PREFORK_START];
return NULL;
What would be a nice name for it? I can't think of anything better
than __get_ss_private() and __get_ss_privatep().
--
Aleksa Sarai (cyphar
for INT_MAX in
the first place. Do you remember why we tried INT_MAX at all?
Thanks.
--
tejun
I think it's because we didn't want to expose PIDS_MAX to userspace.
But we're not *really* exposing it, we're just enforcing the input
limit for max.
--
Aleksa Sarai (cyphar)
www.cyphar.com
change between -can_attach() and
-cancel_attach()).
--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read
Hi Tejun,
Applied 1-4 but skipped bio_associate_current() changes from this
patch. I'll route that part through a different patchset.
Do you want the updated versions of 6-8 of the patchset to be based on
your tree's for-next?
--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from
Hi Tejun,
This is in preparation for implementing the pids cgroup subsystem. It is
not a functional change and should not change any behavior.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
I did a big reorg of cgroup.h and split of cgroup-defs.h from it and
this patch doesn't seem
] or after it checks [which means you'll hit the
parent's limit and won't be able to fork]).
--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http
crazy and breaks stuff like:
if (...)
for_each_subsys_which(...)
--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org
Hi,
Do you also want me to completely drop the COUNT macro? IMO it makes
the CGROUP_TAG_COUNT consolidation much nicer.
--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More
in
semantics, but I'll do that if you prefer it that way.
--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read
CGROUP_TAGNAME_COUNT(CGROUP_TAGNAME_END - CGROUP_TAGNAME_START)
At maximum, we're only gonna have a few of these. No reason to be
smart about it.
Yeah, that's fair I guess.
--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body
the range of a
tagged section much easier.
--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ
a tagging macro to cgroup_subsys.h, so that the ss_state array can
be CGROUP_PREFORK_COUNT in size.
[1]: https://lkml.org/lkml/2015/4/1/145
Aleksa Sarai (4):
cgroups: use bitmask to filter for_each_subsys
cgroups: replace explicit ss_mask checking with for_each_subsys_which
cgroups: allow
a
cgroup to be prevented.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
include/linux/cgroup_subsys.h | 5 +
init/Kconfig | 16 ++
kernel/Makefile | 1 +
kernel/cgroup_pids.c | 367 ++
4 files changed, 389
Replace the explicit checking against ss_masks inside a for_each_subsys
block with for_each_subsys_which(ss_mask, ...), to take advantage of the
more readable macro.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
kernel/cgroup.c | 42 ++
1 file changed
separate bitmasks for
each callback to make (ss-{fork,exit}) checks unnecessary.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
kernel/cgroup.c | 43 ++-
1 file changed, 26 insertions(+), 17 deletions(-)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
for CGROUP_TAG
enumerations to be be defined and used (as well as CGROUP_TAG_COUNT).
This is in preparation for implementing the pids cgroup subsystem.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
include/linux/cgroup.h| 67 +-
include/linux/cgroup_subsys.h
code essentially unreadable).
--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http
into child is violating the constraints and has to
be refused. Anything else is just dirty hackery.
Whoops. Yes, you're completely right. All right, I'll fix up the
patchset in a few days.
--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from this list: send the line unsubscribe linux
a
CGROUP_CANFORK_COUNT macro to make arrays easier to define.
This is in preparation for implementing the pids cgroup subsystem.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
include/linux/cgroup-defs.h | 10 +-
include/linux/cgroup.h| 15 +++--
include/linux/cgroup_subsys.h | 23
From: Tejun Heo t...@kernel.org
Implement task_get_css() which find and pins the css for the specified
task and subsys. As a task is always associated with an online css
for every subsystem except while the css_set update is propagating,
task_get_css() retries till css_tryget_online() succeeds.
Fix the fact that @ssid is uninitialised in the case where
CGROUP_SUBSYS_COUNT = 0 by setting ssid to 0.
Fixes: cb4a31675270 (cgroup: use bitmask to filter for_each_subsys)
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
kernel/cgroup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion
in a marginally
better state than OOM. This subsystem allows PID exhaustion inside a
cgroup to be prevented.
Signed-off-by: Aleksa Sarai cyp...@cyphar.com
---
CREDITS | 5 +
include/linux/cgroup_subsys.h | 5 +
init/Kconfig | 16 ++
kernel/Makefile | 1
and
kernel/cgroup.c.
[1]: https://lkml.org/lkml/2015/6/5/857
Aleksa Sarai (3):
cgroup: fix uninitialised iterator in for_each_subsys_which
cgroup: allow a cgroup subsystem to reject a fork
cgroup: implement the PIDs subsystem
Tejun Heo (1):
cgroup, block: implement task_get_css()
CREDITS
the for_each_subsys_which API for
iterating over active cgroups. :/
--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read
;
cgroup_taskset_for_each(task, tset)
css_put(task_css(task, pids_cgrp_id));
}
--
Aleksa Sarai (cyphar)
www.cyphar.com
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org
err = pids_try_charge(pids, 1);
if (err)
goto out_fail;
Disregard this and the revert code. This was from me testing making
attach obey the set limit (which isn't going to in to the patchset).
--
Aleksa Sarai (cyphar)
www.cyphar.com
/439
Aleksa Sarai (4):
cgroup: use bitmask to filter for_each_subsys
cgroup: replace explicit ss_mask checking with for_each_subsys_which
cgroup: allow a cgroup subsystem to reject a fork
cgroup: implement the PIDs subsystem
Tejun Heo (1):
cgroup, block: implement task_get_css()
CREDITS
1 - 100 of 828 matches
Mail list logo