cgroups.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lennart Poettering <lpoetter-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: aris-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Li Zefan <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>,
	Hugh Dickins <hughd-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
	Hillf Danton <dhillf-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH v6 3/4] cgroup: add xattr support
Date: Tue, 21 Aug 2012 23:43:44 +0200	[thread overview]
Message-ID: <50340110.50607@redhat.com> (raw)
In-Reply-To: <20120816200006.GG24861-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>

Heya,

(sorry for the late reply)

On 16.08.2012 22:00, Tejun Heo wrote:
> On Thu, Aug 16, 2012 at 01:44:56PM -0400, aris-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org wrote:

>>> 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.

>
> I'm not against this but unsure whether using kmem is enough for the
> suggested use case.  Lennart, would this suit systemd?  How much
> metadata are we talking about?

Just small things, like values, PIDs, i.e. a few 100 bytes or so per 
cgroup should be more than sufficient for our needs.

Lennart

  parent reply	other threads:[~2012-08-21 21:43 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-16 17:44 [PATCH v6 0/4] cgroup: add xattr support aris
2012-08-16 17:44 ` [PATCH v6 1/4] xattr: extract simple_xattr code from tmpfs aris
     [not found]   ` <20120816174453.507922179-cd6kKtb6gxi3M6m420IelR/sF2h8X+2i0E9HWUfgJXw@public.gmane.org>
2012-08-16 19:58     ` Tejun Heo
     [not found]       ` <20120816195831.GF24861-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-08-20  7:10         ` Hugh Dickins
     [not found]           ` <alpine.LSU.2.00.1208192356580.24824-fupSdm12i1nKWymIFiNcPA@public.gmane.org>
2012-08-20 19:00             ` Aristeu Rozanski
     [not found]               ` <20120820190039.GR25353-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-08-21  4:47                 ` Hugh Dickins
     [not found]                   ` <alpine.LSU.2.00.1208202122470.1286-fupSdm12i1nKWymIFiNcPA@public.gmane.org>
2012-08-22 20:07                     ` Aristeu Rozanski
     [not found]                       ` <20120822200746.GD16951-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-08-22 20:25                         ` Hugh Dickins
     [not found]                           ` <alpine.LSU.2.00.1208221312540.1909-fupSdm12i1nKWymIFiNcPA@public.gmane.org>
2012-08-22 20:55                             ` Aristeu Rozanski
2012-08-16 17:44 ` [PATCH v6 2/4] cgroup: revise how we re-populate root directory aris
2012-08-16 17:44 ` [PATCH v6 3/4] cgroup: add xattr support aris
2012-08-16 20:00   ` Tejun Heo
     [not found]     ` <20120816200006.GG24861-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-08-21 21:43       ` Lennart Poettering [this message]
     [not found]         ` <50340110.50607-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-08-21 21:48           ` Tejun Heo
2012-08-21 23:29             ` Hugh Dickins
     [not found]               ` <alpine.LSU.2.00.1208211606580.2383-fupSdm12i1nKWymIFiNcPA@public.gmane.org>
2012-08-23 19:44                 ` Tejun Heo
     [not found]                   ` <20120823194423.GC14962-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-08-23 19:58                     ` Aristeu Rozanski
2012-08-24  0:02           ` Eric W. Biederman
2012-08-16 17:44 ` [PATCH v6 4/4] cgroup: rename subsys_bits to subsys_mask aris-H+wXaHxf7aLQT0dZR+AlfA

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=50340110.50607@redhat.com \
    --to=lpoetter-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=aris-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=dhillf-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=hughd-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lizefan-hv44wF8Li93QT0dZR+AlfA@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 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).