From: Li Zefan <lizefan@huawei.com>
To: Daniel Wagner <wagi@monom.org>
Cc: John Fastabend <john.fastabend@gmail.com>,
John Fastabend <john.r.fastabend@intel.com>,
Neil Horman <nhorman@tuxdriver.com>,
Daniel Wagner <daniel.wagner@bmw-carit.de>,
LKML <linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>,
Cgroups <cgroups@vger.kernel.org>
Subject: Re: [BUG] Bug in netprio_cgroup and netcls_cgroup ?
Date: Fri, 25 Jan 2013 16:39:43 +0800 [thread overview]
Message-ID: <510244CF.8050709@huawei.com> (raw)
In-Reply-To: <20130122100938.GA26820@candlejack.bmw-carit.intra>
>>>> BTW, isn't this a similar to what should happen with the block io cgroup?
>>>> What is the behavior with a fd writing to a file in the scenario you
>>>> describe above?
>>>>
>>>
>>> It forbids task moving in this case:
>>>
>>> /*
>>> * We cannot support shared io contexts, as we have no mean to support
>>> * two tasks with the same ioc in two different groups without major rework
>>> * of the main cic data structures. For now we allow a task to change
>>> * its cgroup only if it's the only owner of its ioc.
>>> */
>>> static int blkcg_can_attach(struct cgroup *cgrp, struct cgroup_taskset *tset)
>>>
>>
>> OK, I guess we should do something similar in the netprio, netcls
>> cgroups and
>> yes document it as you noted in your last comment.
>
> Here is my attempt to add such a check. I really don't know if this is the
> correct way to do so. To test this I have written a test program, which
> seems to test the right thing. Please have a look and let me know if
> it is correct: http://www.monom.org/misc/scm_rights.c
>
> And here a dirty first version of the patch:
>
Adding new can_attach() is discouraged. It's considered bad, because if cgroup
is mounted with multi subsystems binded, and if one of them can forbid task
moving for some reason, this will add burden on users to use cgroup properly.
prev parent reply other threads:[~2013-01-25 8:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-21 6:08 [BUG] Bug in netprio_cgroup and netcls_cgroup ? Li Zefan
[not found] ` <50FCDB5C.4050608-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2013-01-21 8:50 ` Daniel Wagner
[not found] ` <50FD0144.1000401-kQCPcA+X3s7YtjvyW6yDsg@public.gmane.org>
2013-01-21 9:01 ` Li Zefan
[not found] ` <50FD0402.6060400-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2013-01-21 9:21 ` John Fastabend
[not found] ` <50FD0893.1050805-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-01-21 9:52 ` Li Zefan
2013-01-21 9:27 ` Daniel Wagner
2013-01-21 9:57 ` Li Zefan
2013-01-21 17:18 ` John Fastabend
[not found] ` <50FD786E.4050108-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-01-22 10:09 ` Daniel Wagner
2013-01-23 0:02 ` John Fastabend
[not found] ` <50FF287C.70906-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-01-23 9:24 ` Daniel Wagner
2013-01-25 8:39 ` Li Zefan [this message]
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=510244CF.8050709@huawei.com \
--to=lizefan@huawei.com \
--cc=cgroups@vger.kernel.org \
--cc=daniel.wagner@bmw-carit.de \
--cc=john.fastabend@gmail.com \
--cc=john.r.fastabend@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=wagi@monom.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).