From: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Li Zefan <lizf-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
Cc: LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Cgroups <cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Lennart Poettering
<mzxreary-uLTowLwuiw4b1SvskN2V4Q@public.gmane.org>,
Kay Sievers <kay.sievers-tD+1rO4QERM@public.gmane.org>
Subject: Re: [PATCH 2/2] cgroup: add xattr support
Date: Tue, 17 Jan 2012 09:53:22 -0800 [thread overview]
Message-ID: <20120117175322.GC6762@google.com> (raw)
In-Reply-To: <4F13DAA9.4070703-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
Hello,
On Mon, Jan 16, 2012 at 04:07:05PM +0800, Li Zefan wrote:
> This is one of the items in the plumber's wish list.
>
> For use cases:
>
> >> What would the use case be for this?
> >
> > Attaching meta information to services, in an easily discoverable
> > way. For example, in systemd we create one cgroup for each service, and
> > could then store data like the main pid of the specific service as an
> > xattr on the cgroup itself. That way we'd have almost all service state
> > in the cgroupfs, which would make it possible to terminate systemd and
> > later restart it without losing any state information. But there's more:
> > for example, some very peculiar services cannot be terminated on
> > shutdown (i.e. fakeraid DM stuff) and it would be really nice if the
> > services in question could just mark that on their cgroup, by setting an
> > xattr. On the more desktopy side of things there are other
> > possibilities: for example there are plans defining what an application
> > is along the lines of a cgroup (i.e. an app being a collection of
> > processes). With xattrs one could then attach an icon or human readable
> > program name on the cgroup.
> >
> > The key idea is that this would allow attaching runtime meta information
> > to cgroups and everything they model (services, apps, vms), that doesn't
> > need any complex userspace infrastructure, has good access control
> > (i.e. because the file system enforces that anyway, and there's the
> > "trusted." xattr namespace), notifications (inotify), and can easily be
> > shared among applications.
> >
> > Lennart
>
> Signed-off-by: Li Zefan <lizf-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
Ummm... I don't feel too good about this. Why can't those extra
information be kept somewhere else? Overloading cgroupfs as storage
for essentially opaque userland information doesn't seem like a good
idea to me.
Thanks.
--
tejun
WARNING: multiple messages have this Message-ID (diff)
From: Tejun Heo <tj@kernel.org>
To: Li Zefan <lizf@cn.fujitsu.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Cgroups <cgroups@vger.kernel.org>,
Lennart Poettering <mzxreary@0pointer.de>,
Kay Sievers <kay.sievers@vrfy.org>
Subject: Re: [PATCH 2/2] cgroup: add xattr support
Date: Tue, 17 Jan 2012 09:53:22 -0800 [thread overview]
Message-ID: <20120117175322.GC6762@google.com> (raw)
In-Reply-To: <4F13DAA9.4070703@cn.fujitsu.com>
Hello,
On Mon, Jan 16, 2012 at 04:07:05PM +0800, Li Zefan wrote:
> This is one of the items in the plumber's wish list.
>
> For use cases:
>
> >> What would the use case be for this?
> >
> > Attaching meta information to services, in an easily discoverable
> > way. For example, in systemd we create one cgroup for each service, and
> > could then store data like the main pid of the specific service as an
> > xattr on the cgroup itself. That way we'd have almost all service state
> > in the cgroupfs, which would make it possible to terminate systemd and
> > later restart it without losing any state information. But there's more:
> > for example, some very peculiar services cannot be terminated on
> > shutdown (i.e. fakeraid DM stuff) and it would be really nice if the
> > services in question could just mark that on their cgroup, by setting an
> > xattr. On the more desktopy side of things there are other
> > possibilities: for example there are plans defining what an application
> > is along the lines of a cgroup (i.e. an app being a collection of
> > processes). With xattrs one could then attach an icon or human readable
> > program name on the cgroup.
> >
> > The key idea is that this would allow attaching runtime meta information
> > to cgroups and everything they model (services, apps, vms), that doesn't
> > need any complex userspace infrastructure, has good access control
> > (i.e. because the file system enforces that anyway, and there's the
> > "trusted." xattr namespace), notifications (inotify), and can easily be
> > shared among applications.
> >
> > Lennart
>
> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Ummm... I don't feel too good about this. Why can't those extra
information be kept somewhere else? Overloading cgroupfs as storage
for essentially opaque userland information doesn't seem like a good
idea to me.
Thanks.
--
tejun
next prev parent reply other threads:[~2012-01-17 17:53 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-16 8:06 [PATCH 1/2] cgroup: revise how we re-populate root directory Li Zefan
2012-01-16 8:06 ` Li Zefan
[not found] ` <4F13DA90.2000603-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2012-01-16 8:07 ` [PATCH 2/2] cgroup: add xattr support Li Zefan
2012-01-16 8:07 ` Li Zefan
[not found] ` <4F13DAA9.4070703-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2012-01-17 17:53 ` Tejun Heo [this message]
2012-01-17 17:53 ` Tejun Heo
[not found] ` <20120117175322.GC6762-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-01-18 8:27 ` Li Zefan
2012-01-18 8:27 ` Li Zefan
[not found] ` <4F168266.3060205-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2012-01-18 17:47 ` Tejun Heo
2012-01-18 17:47 ` Tejun Heo
2012-01-19 1:49 ` Lennart Poettering
2012-01-18 21:28 ` Kay Sievers
2012-01-18 21:28 ` Kay Sievers
[not found] ` <CAPXgP13fT3V4L0x6uj9ZdAOw25BgQtEpa8QzLB-_c_Yn+9kO2Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-01-18 21:36 ` Tejun Heo
2012-01-18 21:36 ` Tejun Heo
2012-01-19 1:47 ` Lennart Poettering
[not found] ` <20120119014727.GG29242-kS5D54t9nk0aINubkmmoJbNAH6kLmebB@public.gmane.org>
2012-01-19 2:20 ` Tejun Heo
2012-01-19 2:20 ` Tejun Heo
[not found] ` <20120119022005.GG21533-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-01-19 2:40 ` Tejun Heo
2012-01-19 2:40 ` Tejun Heo
[not found] ` <20120119024021.GI21533-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-01-21 3:02 ` Lennart Poettering
2012-01-21 3:02 ` Lennart Poettering
[not found] ` <20120121030204.GE2100-kS5D54t9nk0aINubkmmoJbNAH6kLmebB@public.gmane.org>
2012-01-21 4:00 ` Hugh Dickins
2012-01-21 4:00 ` Hugh Dickins
2012-01-21 2:59 ` Lennart Poettering
2012-01-21 2:59 ` Lennart Poettering
2012-01-18 7:23 ` [PATCH 1/2] cgroup: revise how we re-populate root directory Sha
2012-01-18 7:23 ` Sha
2012-01-18 7:59 ` Li Zefan
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=20120117175322.GC6762@google.com \
--to=tj-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=kay.sievers-tD+1rO4QERM@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lizf-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org \
--cc=mzxreary-uLTowLwuiw4b1SvskN2V4Q@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.