All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Matt Roper <matthew.d.roper@intel.com>
Cc: cgroups@vger.kernel.org, intel-gfx@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH RFC 6/9] drm: Add cgroup helper library
Date: Mon, 22 Jan 2018 08:24:47 -0800	[thread overview]
Message-ID: <20180122162447.GD1096857@devbig577.frc2.facebook.com> (raw)
In-Reply-To: <20180120015141.10118-7-matthew.d.roper@intel.com>

Hello, Matt.

On Fri, Jan 19, 2018 at 05:51:38PM -0800, Matt Roper wrote:
> Most DRM drivers will want to handle the CGROUP_SETPARAM ioctl by looking up a
> driver-specific per-cgroup data structure (or allocating a new one) and storing
> the supplied parameter value into the data structure (possibly after doing some
> checking and sanitization on the provided value).  Let's provide a helper
> library for drivers that will take care of the details of storing per-cgroup
> data structures in a hashtable and destroying those structures if/when the
> cgroup itself is removed.

Would it be possible to make the core of this a built-in part of
cgroup like cgroup-bpf does?  My gut feeling is that that isn't gonna
be much code anyway and likely to be cleaner to implement and use.

Being a full-fledged controller comes with quite a bit of complexity
in terms of sync rules and everything, and we may build a simpler
modular infrastructure if usages like this proliferate but for now
extending from the core seems the most straight forward.

Thanks.

-- 
tejun
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-01-22 16:24 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-20  1:51 [PATCH RFC 0/9] DRM management via cgroups Matt Roper
2018-01-20  1:51 ` [PATCH RFC 2/9] cgroup: Add notifier call chain for cgroup destruction Matt Roper
     [not found] ` <20180120015141.10118-1-matthew.d.roper-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2018-01-20  1:51   ` [PATCH RFC 1/9] kernfs: Export kernfs_get_inode Matt Roper
2018-01-20  1:51   ` [PATCH RFC 3/9] cgroup: Export cgroup_on_dfl() to drivers Matt Roper
2018-01-20  1:51   ` [PATCH RFC 6/9] drm: Add cgroup helper library Matt Roper
2018-01-22 16:24     ` Tejun Heo [this message]
2018-01-20  1:51   ` [PATCH RFC 7/9] drm: Add helper to obtain cgroup of drm_file's owning process Matt Roper
2018-01-20  1:51   ` [PATCH RFC 8/9] drm/i915: Allow default context priority to be set via cgroup parameter Matt Roper
2018-01-20  1:51     ` Matt Roper
     [not found]     ` <20180120015141.10118-9-matthew.d.roper-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2018-01-20  9:36       ` Chris Wilson
     [not found]         ` <151644097064.13504.16277692057900569412-M6iVdVfohj6unts5RBS2dVaTQe2KTcn/@public.gmane.org>
2018-01-20 10:40           ` Chris Wilson
2018-01-22  9:50             ` Michel Dänzer
2018-01-22  9:56               ` Chris Wilson
2018-01-22 15:57             ` Matt Roper
2018-01-20  1:51   ` [PATCH RFC 9/9] drm/i915: Add context priority to debugfs Matt Roper
2018-01-20  1:51 ` [PATCH RFC 4/9] cgroup: Export task_cgroup_from_root() and cgroup_mutex for drivers Matt Roper
2018-01-20  1:51 ` [PATCH RFC 5/9] drm: Introduce DRM_IOCTL_CGROUP_SETPARAM Matt Roper
2018-01-20  2:20 ` ✗ Fi.CI.BAT: warning for DRM management via cgroups Patchwork
2018-01-22 15:44 ` [PATCH libdrm] tests: Add drm_set_cgrp_param Matt Roper
2018-01-26 17:08   ` Emil Velikov
2018-01-26 17:27     ` [Intel-gfx] " Matt Roper
2018-01-26 17:57       ` Emil Velikov

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=20180122162447.GD1096857@devbig577.frc2.facebook.com \
    --to=tj@kernel.org \
    --cc=cgroups@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.d.roper@intel.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.