From: Austin S Hemmelgarn <ahferroin7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Aleksa Sarai <cyphar-gVpy/LI/lHzQT0dZR+AlfA@public.gmane.org>
Cc: Parav Pandit
<pandit.parav-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Max Kellermann <mk-xMchvyqCc6DQT0dZR+AlfA@public.gmane.org>,
Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org,
Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>,
max-hDT0AjmEH7RAfugRpC6u6w@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] cgroup_pids: add fork limit
Date: Mon, 16 Nov 2015 12:02:06 -0500 [thread overview]
Message-ID: <564A0C0E.6090004@gmail.com> (raw)
In-Reply-To: <CAOviyag=rHcDZj3MBR3dMbkdaOY=h1FB-78QLM3CZQe2WrrgCQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1694 bytes --]
On 2015-11-15 08:36, Aleksa Sarai wrote:
>>> If so, could you share little more insight on how that time measure
>>> outside of the cpu's cgroup cycles? Just so that its helpful to wider
>>> audience.
>>
>> Well, there are a number of things that I can think of that the kernel does
>> on behalf of processes that can consume processor time that isn't trivial to
>> account:
>> * Updating timers on behalf of userspace processes (itimers or similar).
>> * Sending certain kernel generated signals to processes (that is, stuff
>> generated by the kernel like SIGFPE, SIGSEGV, and so forth).
>> * Queuing events from dnotify/inotify/fanotify.
>> * TLB misses, page faults, and swapping.
>> * Setting up new processes prior to them actually running.
>> * Scheduling.
>> All of these are things that fork-bombs can and (other than TLB misses) do
>> exploit to bring a system down, and the cpu cgroup is by no means a magic
>> bullet to handle this.
>
> I feel like these are backed by different resources, and we should
> work on limiting those *at the source* in the context of a controller
> rather than just patching up the symptoms (too many forks causing
> issues), because these are symptoms of a larger issue IMO.
OK, what specific resources back each of the things that I mentioned?
Other than setting up a new process (which in retrospect I realize
should probably just be accounted as processor time for the parent), I
can't really see much that most of these are backed by, other than
processor time (and until someone demonstrates otherwise, I stand by my
statement that they are non-trivial to account properly as processor time).
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 3019 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Austin S Hemmelgarn <ahferroin7@gmail.com>
To: Aleksa Sarai <cyphar@cyphar.com>
Cc: Parav Pandit <pandit.parav@gmail.com>,
Max Kellermann <mk@cm4all.com>, Tejun Heo <tj@kernel.org>,
cgroups@vger.kernel.org, lizefan@huawei.com,
Johannes Weiner <hannes@cmpxchg.org>,
max@duempel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cgroup_pids: add fork limit
Date: Mon, 16 Nov 2015 12:02:06 -0500 [thread overview]
Message-ID: <564A0C0E.6090004@gmail.com> (raw)
In-Reply-To: <CAOviyag=rHcDZj3MBR3dMbkdaOY=h1FB-78QLM3CZQe2WrrgCQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1694 bytes --]
On 2015-11-15 08:36, Aleksa Sarai wrote:
>>> If so, could you share little more insight on how that time measure
>>> outside of the cpu's cgroup cycles? Just so that its helpful to wider
>>> audience.
>>
>> Well, there are a number of things that I can think of that the kernel does
>> on behalf of processes that can consume processor time that isn't trivial to
>> account:
>> * Updating timers on behalf of userspace processes (itimers or similar).
>> * Sending certain kernel generated signals to processes (that is, stuff
>> generated by the kernel like SIGFPE, SIGSEGV, and so forth).
>> * Queuing events from dnotify/inotify/fanotify.
>> * TLB misses, page faults, and swapping.
>> * Setting up new processes prior to them actually running.
>> * Scheduling.
>> All of these are things that fork-bombs can and (other than TLB misses) do
>> exploit to bring a system down, and the cpu cgroup is by no means a magic
>> bullet to handle this.
>
> I feel like these are backed by different resources, and we should
> work on limiting those *at the source* in the context of a controller
> rather than just patching up the symptoms (too many forks causing
> issues), because these are symptoms of a larger issue IMO.
OK, what specific resources back each of the things that I mentioned?
Other than setting up a new process (which in retrospect I realize
should probably just be accounted as processor time for the parent), I
can't really see much that most of these are backed by, other than
processor time (and until someone demonstrates otherwise, I stand by my
statement that they are non-trivial to account properly as processor time).
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 3019 bytes --]
next prev parent reply other threads:[~2015-11-16 17:02 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-10 14:06 [PATCH] cgroup_pids: add fork limit Max Kellermann
[not found] ` <144716440621.20175.1000688899886388119.stgit-Rjmu19FXx3rR8JxBgnUBv+rzNCUFrscg@public.gmane.org>
2015-11-10 15:12 ` Tejun Heo
2015-11-10 15:12 ` Tejun Heo
2015-11-10 15:37 ` Max Kellermann
[not found] ` <20151110153746.GA20758-Rjmu19FXx3rR8JxBgnUBv+rzNCUFrscg@public.gmane.org>
2015-11-10 15:44 ` Tejun Heo
2015-11-10 15:44 ` Tejun Heo
2015-11-10 17:06 ` Max Kellermann
2015-11-10 17:06 ` Max Kellermann
2015-11-10 17:29 ` Tejun Heo
[not found] ` <20151110172915.GA13740-qYNAdHglDFBN0TnZuCh8vA@public.gmane.org>
2015-11-10 17:52 ` Max Kellermann
2015-11-10 17:52 ` Max Kellermann
2015-11-10 15:25 ` Aleksa Sarai
2015-11-10 15:25 ` Aleksa Sarai
2015-11-10 15:58 ` Austin S Hemmelgarn
2015-11-10 16:19 ` Parav Pandit
2015-11-10 19:54 ` Austin S Hemmelgarn
[not found] ` <56424B83.2080504-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-11-15 13:36 ` Aleksa Sarai
2015-11-15 13:36 ` Aleksa Sarai
[not found] ` <CAOviyag=rHcDZj3MBR3dMbkdaOY=h1FB-78QLM3CZQe2WrrgCQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-11-16 17:02 ` Austin S Hemmelgarn [this message]
2015-11-16 17:02 ` Austin S Hemmelgarn
2015-11-10 16:01 ` Max Kellermann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=564A0C0E.6090004@gmail.com \
--to=ahferroin7-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=cyphar-gVpy/LI/lHzQT0dZR+AlfA@public.gmane.org \
--cc=hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org \
--cc=max-hDT0AjmEH7RAfugRpC6u6w@public.gmane.org \
--cc=mk-xMchvyqCc6DQT0dZR+AlfA@public.gmane.org \
--cc=pandit.parav-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.