All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: aris@redhat.com
Cc: linux-kernel@vger.kernel.org, cgroups@vger.kernel.org,
	Li Zefan <lizefan@huawei.com>, Hugh Dickins <hughd@google.com>,
	Hillf Danton <dhillf@gmail.com>,
	Lennart Poettering <lpoetter@redhat.com>
Subject: Re: [PATCH v6 3/4] cgroup: add xattr support
Date: Thu, 16 Aug 2012 13:00:06 -0700	[thread overview]
Message-ID: <20120816200006.GG24861@google.com> (raw)
In-Reply-To: <20120816174454.087507415@napanee.usersys.redhat.com>

On Thu, Aug 16, 2012 at 01:44:56PM -0400, aris@redhat.com wrote:
> From: Li Zefan <lizefan@huawei.com>
> 
> 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
> 
> v6:
> - remove user xattr namespace, only allow trusted and security
> v5:
> - check for capabilities before setting/removing xattrs
> v4:
> - no changes
> v3:
> - instead of config option, use mount option to enable xattr support
> 
> Cc: Li Zefan <lizefan@huawei.com>
> Cc: Tejun Heo <tj@kernel.org>
> Cc: Hugh Dickins <hughd@google.com>
> Cc: Hillf Danton <dhillf@gmail.com>
> Cc: Lennart Poettering <lpoetter@redhat.com>
> Signed-off-by: Li Zefan <lizefan@huawei.com>
> Signed-off-by: Aristeu Rozanski <aris@redhat.com>

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?

Thanks.

-- 
tejun

  reply	other threads:[~2012-08-16 20:00 UTC|newest]

Thread overview: 32+ 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
2012-08-16 19:58       ` Tejun Heo
     [not found]       ` <20120816195831.GF24861-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-08-20  7:10         ` Hugh Dickins
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
2012-08-20 19:00               ` Aristeu Rozanski
     [not found]               ` <20120820190039.GR25353-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-08-21  4:47                 ` Hugh Dickins
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
2012-08-22 20:07                       ` Aristeu Rozanski
     [not found]                       ` <20120822200746.GD16951-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-08-22 20:25                         ` Hugh Dickins
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-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 [this message]
     [not found]     ` <20120816200006.GG24861-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-08-21 21:43       ` Lennart Poettering
2012-08-21 21:43         ` Lennart Poettering
     [not found]         ` <50340110.50607-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-08-21 21:48           ` Tejun Heo
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
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-23 19:58                       ` Aristeu Rozanski
2012-08-24  0:02           ` Eric W. Biederman
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
2012-08-16 17:44   ` aris

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=20120816200006.GG24861@google.com \
    --to=tj@kernel.org \
    --cc=aris@redhat.com \
    --cc=cgroups@vger.kernel.org \
    --cc=dhillf@gmail.com \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=lpoetter@redhat.com \
    /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.