All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH 0/2] Support user xattrs in cgroupfs
@ 2020-03-03 19:20   ` Daniel Xu
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Xu @ 2020-03-03 19:20 UTC (permalink / raw)
  To: Shakeel Butt
  Cc: Cgroups, Tejun Heo, Li Zefan, Johannes Weiner, LKML,
	Greg Kroah-Hartman, Kernel Team

On Tue Mar 3, 2020 at 8:50 AM, Shakeel Butt wrote:
> Hi Daniel,
>
> 
> On Mon, Mar 2, 2020 at 5:42 PM Daniel Xu <dxu@dxuuu.xyz> wrote:
> >
> > User extended attributes are useful as metadata storage for kernfs
> > consumers like cgroups. Especially in the case of cgroups, it is useful
> > to have a central metadata store that multiple processes/services can
> > use to coordinate actions.
> >
> > A concrete example is for userspace out of memory killers. We want to
> > let delegated cgroup subtree owners (running as non-root) to be able to
> > say "please avoid killing this cgroup". In server environments this is
> > less important as everyone is running as root.
>
> 
> I would recommend removing the "everyone is running as root" statement
> as it is not generally true.
>
> 
> Shakeel

Good point, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] Support user xattrs in cgroupfs
@ 2020-03-03 19:20   ` Daniel Xu
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Xu @ 2020-03-03 19:20 UTC (permalink / raw)
  To: Shakeel Butt
  Cc: Cgroups, Tejun Heo, Li Zefan, Johannes Weiner, LKML,
	Greg Kroah-Hartman, Kernel Team

On Tue Mar 3, 2020 at 8:50 AM, Shakeel Butt wrote:
> Hi Daniel,
>
> 
> On Mon, Mar 2, 2020 at 5:42 PM Daniel Xu <dxu-zUS5+7O8QwqlVyrhU4qvOw@public.gmane.org> wrote:
> >
> > User extended attributes are useful as metadata storage for kernfs
> > consumers like cgroups. Especially in the case of cgroups, it is useful
> > to have a central metadata store that multiple processes/services can
> > use to coordinate actions.
> >
> > A concrete example is for userspace out of memory killers. We want to
> > let delegated cgroup subtree owners (running as non-root) to be able to
> > say "please avoid killing this cgroup". In server environments this is
> > less important as everyone is running as root.
>
> 
> I would recommend removing the "everyone is running as root" statement
> as it is not generally true.
>
> 
> Shakeel

Good point, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] Support user xattrs in cgroupfs
  2020-03-03  1:38 Daniel Xu
@ 2020-03-03 16:50 ` Shakeel Butt
  0 siblings, 0 replies; 4+ messages in thread
From: Shakeel Butt @ 2020-03-03 16:50 UTC (permalink / raw)
  To: Daniel Xu
  Cc: Cgroups, Tejun Heo, Li Zefan, Johannes Weiner, LKML,
	Greg Kroah-Hartman, Kernel Team

Hi Daniel,

On Mon, Mar 2, 2020 at 5:42 PM Daniel Xu <dxu@dxuuu.xyz> wrote:
>
> User extended attributes are useful as metadata storage for kernfs
> consumers like cgroups. Especially in the case of cgroups, it is useful
> to have a central metadata store that multiple processes/services can
> use to coordinate actions.
>
> A concrete example is for userspace out of memory killers. We want to
> let delegated cgroup subtree owners (running as non-root) to be able to
> say "please avoid killing this cgroup". In server environments this is
> less important as everyone is running as root.

I would recommend removing the "everyone is running as root" statement
as it is not generally true.

Shakeel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 0/2] Support user xattrs in cgroupfs
@ 2020-03-03  1:38 Daniel Xu
  2020-03-03 16:50 ` Shakeel Butt
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Xu @ 2020-03-03  1:38 UTC (permalink / raw)
  To: cgroups, tj, lizefan, hannes; +Cc: Daniel Xu, linux-kernel, gregkh, kernel-team

User extended attributes are useful as metadata storage for kernfs
consumers like cgroups. Especially in the case of cgroups, it is useful
to have a central metadata store that multiple processes/services can
use to coordinate actions.

A concrete example is for userspace out of memory killers. We want to
let delegated cgroup subtree owners (running as non-root) to be able to
say "please avoid killing this cgroup". In server environments this is
less important as everyone is running as root. But for desktop linux,
this is more important.

The first patch introduces a new flag, KERNFS_ROOT_SUPPORT_USER_XATTR,
that lets kernfs consumers enable user xattr support. The second patch
turns on this feature for cgroupfs.

Daniel Xu (2):
  kernfs: Add option to enable user xattrs
  cgroupfs: Support user xattrs

 fs/kernfs/inode.c           | 47 +++++++++++++++++++++++++++++++++++++
 fs/kernfs/kernfs-internal.h |  1 +
 include/linux/kernfs.h      |  6 +++++
 kernel/cgroup/cgroup.c      |  3 ++-
 4 files changed, 56 insertions(+), 1 deletion(-)

-- 
2.21.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-03-03 19:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CALvZod5m3otRRqcLBebbgiZbhoYWAMbMg+ESkacJuj64OP =H4Q@mail.gmail.com>
2020-03-03 19:20 ` [PATCH 0/2] Support user xattrs in cgroupfs Daniel Xu
2020-03-03 19:20   ` Daniel Xu
2020-03-03  1:38 Daniel Xu
2020-03-03 16:50 ` Shakeel Butt

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.