From: Victor Porton <porton@narod.ru>
To: Michal Hocko <mhocko@suse.cz>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
cgroups mailinglist <cgroups@vger.kernel.org>
Subject: Re: Notifying on empty cgroup
Date: Wed, 15 Jan 2014 16:11:40 +0200 [thread overview]
Message-ID: <409331389795100@web18j.yandex.ru> (raw)
In-Reply-To: <20140115135930.GK8782@dhcp22.suse.cz>
15.01.2014, 15:59, "Michal Hocko" <mhocko@suse.cz>:
> [CCing cgroups mailing list]
> On Wed 15-01-14 06:12:45, Victor Porton wrote:
>
>> I want to write software which needs to receive a signal when the cgroup
>> created by it becomes empty. (After this the empty cgroup should be deleted
>> just not to clutter the memory.)
>>
>> If the kernel does not support such notifications, it should be improved.
>> This functionality is crucial for some kinds of software.
>>
>> There is /sys/fs/cgroup/systemd/release_agent but I don't understand how to
>> use it. I don't understand why we would need it at all.
>
> "1.4 What does notify_on_release do ?" in
> Documentation/cgroups/cgroups.txt the kernel source doesn't help?
I've read it. I understand what it does. I don't understand how to use it in practice nor why it is done this way.
>> Starting a binary on emptying a cgroup with the purpose to notify an other
>> binary looks like a big overkill.
>
> the binary can do rmdir which is what you want, no?
I suppose a base package should do that, not my specific software. Do I understand right?
>> Also my program should work in userspace without the need to use
>> release_agent which can be accessed only by root.
>
> The release_agent is global for all groups so the program doesn't have
> to care.
Again: What MY program should do?
>> Note that my work is related with sandboxing software (running a program in
>> closed environment, so that it would be unable for example to remove user's
>> files).
>>
>> See also
>> http://portonsoft.wordpress.com/2014/01/11/toward-robust-linux-sandbox/
>>
>> --
>> Victor Porton - http://portonvictor.org
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at http://www.tux.org/lkml/
>
> --
> Michal Hocko
> SUSE Labs
--
Victor Porton - http://portonvictor.org
next prev parent reply other threads:[~2014-01-15 14:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-15 4:12 Victor Porton
2014-01-15 13:59 ` Michal Hocko
2014-01-15 14:11 ` Victor Porton [this message]
2014-01-15 15:12 ` Michal Hocko
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=409331389795100@web18j.yandex.ru \
--to=porton@narod.ru \
--cc=cgroups@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhocko@suse.cz \
/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
all inboxes | Powered by JetHome®