From: Matt Roper <matthew.d.roper@intel.com>
To: "Ho, Kenny" <Kenny.Ho@amd.com>
Cc: "intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"Kasiviswanathan, Harish" <Harish.Kasiviswanathan@amd.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"y2kenny@gmail.com" <y2kenny@gmail.com>,
"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
Tejun Heo <tj@kernel.org>,
"cgroups@vger.kernel.org" <cgroups@vger.kernel.org>
Subject: Re: [Intel-gfx] [PATCH RFC 2/5] cgroup: Add mechanism to register vendor specific DRM devices
Date: Mon, 3 Dec 2018 10:58:57 -0800 [thread overview]
Message-ID: <20181203185857.GE6859@mdroper-desk.amr.corp.intel.com> (raw)
In-Reply-To: <DM5PR12MB122643DABCCF5D06C80235FA83AE0@DM5PR12MB1226.namprd12.prod.outlook.com>
On Mon, Dec 03, 2018 at 06:46:01AM +0000, Ho, Kenny wrote:
> Hey Matt,
>
> On Fri, Nov 30, 2018 at 5:22 PM Matt Roper <matthew.d.roper@intel.com> wrote:
> > I think Joonas is describing something closer in
> > design to the cgroup-v2 "cpu" controller, which partitions the general
> > time/usage allocated to via cgroup; afaiu, "cpu" doesn't really care
> > which specific core the tasks run on, just the relative weights that
> > determine how much time they get to run on any of the cores.
>
> Depending on the level of optimization one wants to do, I think people
> care about which cpu core a task runs on. Modern processors are no
> longer a monolithic 'thing'. At least for AMD, there are multiple
> cpus on a core complex (CCX), multiple CCX on a die, and multiple dies
> on a processor. A task running on cpu 0 and cpu 1 on die 0 will
> behave very differently from a task running on core 0s on die 0 and
> die 1 on the same socket.
> (https://en.wikichip.org/wiki/amd/microarchitectures/zen#Die-die_memory_latencies)
>
> It's not just an AMD thing either. Here is an open issue on Intel's architecture:
> https://github.com/kubernetes/kubernetes/issues/67355
>
> and a proposed solution using cpu affinity
> https://github.com/kubernetes/community/blob/630acc487c80e4981a232cdd8400eb8207119788/keps/sig-node/0030-qos-class-cpu-affinity.md#proposal
> (by one of your colleagues.)
Right, I didn't mean to imply that the use case wasn't valid, I was just
referring to how I believe the cgroup-v2 'cpu' controller (i.e.,
cpu_cgrp_subsys) currently behaves, as a contrast to the behavior of the
cgroup-v1 'cpuset' controller. I can definitely understand your
motivation for wanting something along the lines of a "gpuset"
controller, but as far as I know, that just isn't something that's
possible to implement on a lot of GPU's.
>
> The time-based sharing below is also something we are thinking about,
> but it's personally not as exciting as the resource-based sharing for
> me because the time-share use case has already been addressed by our
> SRIOV/virtualization products. We can potentially have different
> level of time sharing using cgroup though (in addition to SRIOV),
> potentially trading efficiency against isolation. That said, I think
> the time-based approach maybe orthogonal to the resource-based
> approach (orthogonal in the sense that both are needed depending on
> the usage.)
Makes sense.
Matt
>
> Regards,
> Kenny
>
>
> > It sounds like with your hardware, your kernel driver is able to specify
> > exactly which subset of GPU EU's a specific GPU context winds up running
> > on. However I think there are a lot of platforms that don't allow that
> > kind of low-level control. E.g., I don't think we can do that on Intel
> > hardware; we have a handful of high-level GPU engines that we can submit
> > different types of batchbuffers to (render, blitter, media, etc.). What
> > we can do is use GPU preemption to limit how much time specific GPU
> > contexts get to run on the render engine before the engine is reclaimed
> > for use by a different context.
> >
> > Using a %gputime approach like Joonas is suggesting could be handled in
> > a driver by reserving specific subsets of EU's on hardware like yours
> > that's capable of doing that, whereas it could be mostly handled on
> > other types of hardware via GPU engine preemption.
> >
> > I think either approach "gpu_euset" or "%gputime" should map well to a
> > cgroup controller implementation. Granted, neither one solves the
> > specific use case I was working on earlier this year where we need
> > unfair (starvation-okay) scheduling that will run contexts strictly
> > according to priority (i.e., lower priority contexts will never run at
> > all unless all higher priority contexts have completed all of their
> > submitted work), but that's a pretty specialized use case that we'll
> > probably need to handle in a different manner anyway.
> >
> >
> > Matt
> >
> >
> > > Regards,
> > > Kennny
> > >
> > >
> > > > > > That combined with the "GPU memory usable" property should be a good
> > > > > > starting point to start subdividing the GPU resources for multiple
> > > > > > users.
> > > > > >
> > > > > > Regards, Joonas
> > > > > >
> > > > > > >
> > > > > > > Your feedback is highly appreciated.
> > > > > > >
> > > > > > > Best Regards,
> > > > > > > Harish
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Tejun Heo <tj@kernel.org>
> > > > > > > Sent: Tuesday, November 20, 2018 5:30 PM
> > > > > > > To: Ho, Kenny
> > > > > > > Cc: cgroups@vger.kernel.org; intel-gfx@lists.freedesktop.org; y2kenny@gmail.com; amd-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org
> > > > > > > Subject: Re: [PATCH RFC 2/5] cgroup: Add mechanism to register vendor specific DRM devices
> > > > > > >
> > > > > > >
> > > > > > > Hello,
> > > > > > >
> > > > > > > On Tue, Nov 20, 2018 at 10:21:14PM +0000, Ho, Kenny wrote:
> > > > > > > > By this reply, are you suggesting that vendor specific resources
> > > > > > > > will never be acceptable to be managed under cgroup? Let say a user
> > > > > > >
> > > > > > > I wouldn't say never but whatever which gets included as a cgroup
> > > > > > > controller should have clearly defined resource abstractions and the
> > > > > > > control schemes around them including support for delegation. AFAICS,
> > > > > > > gpu side still seems to have a long way to go (and it's not clear
> > > > > > > whether that's somewhere it will or needs to end up).
> > > > > > >
> > > > > > > > want to have similar functionality as what cgroup is offering but to
> > > > > > > > manage vendor specific resources, what would you suggest as a
> > > > > > > > solution? When you say keeping vendor specific resource regulation
> > > > > > > > inside drm or specific drivers, do you mean we should replicate the
> > > > > > > > cgroup infrastructure there or do you mean either drm or specific
> > > > > > > > driver should query existing hierarchy (such as device or perhaps
> > > > > > > > cpu) for the process organization information?
> > > > > > > >
> > > > > > > > To put the questions in more concrete terms, let say a user wants to
> > > > > > > > expose certain part of a gpu to a particular cgroup similar to the
> > > > > > > > way selective cpu cores are exposed to a cgroup via cpuset, how
> > > > > > > > should we go about enabling such functionality?
> > > > > > >
> > > > > > > Do what the intel driver or bpf is doing? It's not difficult to hook
> > > > > > > into cgroup for identification purposes.
> > > > > > >
> > > > > > > Thanks.
> > > > > > >
> > > > > > > --
> > > > > > > tejun
> > > > > > > _______________________________________________
> > > > > > > amd-gfx mailing list
> > > > > > > amd-gfx@lists.freedesktop.org
> > > > > > > https://lists.freedesktop.org/mailman/listinfo/amd-gfx
> > > > > > >
> > > > > > >
> > > > > > > amd-gfx Info Page - freedesktop.org
> > > > > > > lists.freedesktop.org
> > > > > > > To see the collection of prior postings to the list, visit the amd-gfx Archives.. Using amd-gfx: To post a message to all the list members, send email to amd-gfx@lists.freedesktop.org. You can subscribe to the list, or change your existing subscription, in the sections below.
> > > > > > >
> > > > > > > _______________________________________________
> > > > > > > Intel-gfx mailing list
> > > > > > > Intel-gfx@lists.freedesktop.org
> > > > > > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
> >
> > --
> > Matt Roper
> > Graphics Software Engineer
> > IoTG Platform Enabling & Development
> > Intel Corporation
> > (916) 356-2795
--
Matt Roper
Graphics Software Engineer
IoTG Platform Enabling & Development
Intel Corporation
(916) 356-2795
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2018-12-03 18:58 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-20 18:58 [PATCH RFC 0/5] DRM cgroup controller Kenny Ho
2018-11-20 18:58 ` [PATCH RFC 1/5] cgroup: Introduce cgroup for drm subsystem Kenny Ho
[not found] ` <20181120185814.13362-1-Kenny.Ho-5C7GfCeVMHo@public.gmane.org>
2018-11-20 18:58 ` [PATCH RFC 2/5] cgroup: Add mechanism to register vendor specific DRM devices Kenny Ho
[not found] ` <20181120185814.13362-3-Kenny.Ho-5C7GfCeVMHo@public.gmane.org>
2018-11-20 20:21 ` Tejun Heo
[not found] ` <20181120202141.GA2509588-LpCCV3molIbIZ9tKgghJQw2O0Ztt9esIQQ4Iyu8u01E@public.gmane.org>
2018-11-20 22:21 ` Ho, Kenny
[not found] ` <DM5PR12MB1226E972538A45325114ADF683D90-2J9CzHegvk+lTFawYev2gQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-11-20 22:30 ` Tejun Heo
[not found] ` <20181120223018.GB2509588-LpCCV3molIbIZ9tKgghJQw2O0Ztt9esIQQ4Iyu8u01E@public.gmane.org>
2018-11-21 22:07 ` Ho, Kenny
2018-11-21 22:12 ` Ho, Kenny
2018-11-26 20:59 ` Kasiviswanathan, Harish
2018-11-27 9:38 ` Koenig, Christian
2018-11-27 9:46 ` [Intel-gfx] " Joonas Lahtinen
2018-11-27 15:41 ` Ho, Kenny
2018-11-28 9:14 ` Joonas Lahtinen
2018-11-28 19:46 ` Ho, Kenny
2018-11-30 22:22 ` Matt Roper
[not found] ` <20181130222228.GE31345-b/RNqDZ/lqH1fpGqjiHozbKMmGWinSIL2HeeBUIffwg@public.gmane.org>
2018-12-03 6:46 ` [Intel-gfx] " Ho, Kenny
2018-12-03 18:58 ` Matt Roper [this message]
[not found] ` <154339645444.5339.6291298808444340104-zzJjBcU1GAT9BXuAQUXR0fooFf0ArEBIu+b9c/7xato@public.gmane.org>
2018-12-03 20:55 ` Kuehling, Felix
[not found] ` <219f8754-3e14-05ad-07a3-6cddb8bb74aa-5C7GfCeVMHo@public.gmane.org>
2018-12-05 14:20 ` Joonas Lahtinen
2018-11-21 9:53 ` Christian König
2018-11-20 18:58 ` [PATCH RFC 3/5] drm/amdgpu: Add DRM cgroup support for AMD devices Kenny Ho
[not found] ` <20181120185814.13362-4-Kenny.Ho-5C7GfCeVMHo@public.gmane.org>
2018-11-21 9:55 ` Christian König
2018-11-20 18:58 ` [PATCH RFC 4/5] drm/amdgpu: Add accounting of command submission via DRM cgroup Kenny Ho
2018-11-20 20:57 ` Eric Anholt
[not found] ` <87r2ff79he.fsf-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org>
2018-11-21 10:03 ` Christian König
2018-11-23 17:36 ` Eric Anholt
[not found] ` <871s7b7l2b.fsf-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org>
2018-11-23 18:13 ` Koenig, Christian
[not found] ` <095e010c-e3b8-ec79-c87b-a05ce1d95e10-5C7GfCeVMHo@public.gmane.org>
2018-11-23 19:09 ` Ho, Kenny
2018-11-21 9:58 ` Christian König
2018-11-20 18:58 ` [PATCH RFC 5/5] drm/amdgpu: Add accounting of buffer object creation request " Kenny Ho
[not found] ` <20181120185814.13362-6-Kenny.Ho-5C7GfCeVMHo@public.gmane.org>
2018-11-20 20:56 ` Eric Anholt
2018-11-21 10:00 ` Christian König
2018-11-27 18:15 ` Kenny Ho
[not found] ` <CAOWid-fMFUvT_XQijRd34+cUOxM=zbbf+HwWv_NbqO-rBo2d_A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-11-27 20:31 ` Christian König
[not found] ` <3299d9d6-e272-0459-8f63-0c81d11cde1e-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-11-27 20:36 ` Kenny Ho
2019-05-09 21:04 ` [RFC PATCH v2 0/5] new cgroup controller for gpu/drm subsystem Kenny Ho
2019-05-09 21:04 ` [RFC PATCH v2 3/5] drm/amdgpu: Register AMD devices for DRM cgroup Kenny Ho
2019-05-09 21:04 ` [RFC PATCH v2 4/5] drm, cgroup: Add total GEM buffer allocation limit Kenny Ho
[not found] ` <20190509210410.5471-5-Kenny.Ho-5C7GfCeVMHo@public.gmane.org>
2019-05-10 12:28 ` Christian König
[not found] ` <f63c8d6b-92a4-2977-d062-7e0b7036834e-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-05-10 14:57 ` Kenny Ho
2019-05-10 15:08 ` Koenig, Christian
[not found] ` <1ca1363e-b39c-c299-1d24-098b1059f7ff-5C7GfCeVMHo@public.gmane.org>
2019-05-10 15:25 ` Kenny Ho
2019-05-10 17:48 ` Koenig, Christian
2019-05-10 18:50 ` Kenny Ho
[not found] ` <CAOWid-es+C_iStQUkM52mO3TeP8eS9MX+emZDQNH2PyZCf=RHQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-05-13 15:10 ` Daniel Vetter
2019-05-15 21:26 ` Welty, Brian
[not found] ` <d81e8f55-9602-818e-0f9c-1d9d150133b1-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2019-05-16 2:29 ` Kenny Ho
[not found] ` <CAOWid-ftUrVVWPu9KuS8xpWKNQT6_FtxB8gEyEAn9nLD6qxb5Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-05-16 7:16 ` Koenig, Christian
2019-05-16 7:25 ` Christian König
[not found] ` <6e124f5e-f83f-5ca1-4616-92538f202653-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-05-16 12:28 ` Daniel Vetter
2019-05-16 14:08 ` Koenig, Christian
2019-05-16 14:03 ` Kenny Ho
[not found] ` <CAOWid-fQgah16ycz-V-ymsm7yKUnFTeTSBaW4MK=2mqUHhCcmw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-05-16 14:12 ` Christian König
2019-05-16 14:28 ` Kenny Ho
2019-05-16 14:10 ` Tejun Heo
2019-05-16 14:58 ` Kenny Ho
[not found] ` <20190509210410.5471-1-Kenny.Ho-5C7GfCeVMHo@public.gmane.org>
2019-05-09 21:04 ` [RFC PATCH v2 1/5] cgroup: Introduce cgroup for drm subsystem Kenny Ho
2019-05-09 21:04 ` [RFC PATCH v2 2/5] cgroup: Add mechanism to register DRM devices Kenny Ho
2019-05-09 21:04 ` [RFC PATCH v2 5/5] drm, cgroup: Add peak GEM buffer allocation limit Kenny Ho
[not found] ` <20190509210410.5471-6-Kenny.Ho-5C7GfCeVMHo@public.gmane.org>
2019-05-10 12:29 ` Christian König
2019-05-10 12:31 ` [RFC PATCH v2 0/5] new cgroup controller for gpu/drm subsystem Christian König
2019-05-10 15:07 ` Kenny Ho
[not found] ` <CAOWid-dJZrnAifFYByh4p9x-jA1o_5YWkoNVAVbdRUaxzdPbGA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2019-05-10 17:46 ` Koenig, Christian
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=20181203185857.GE6859@mdroper-desk.amr.corp.intel.com \
--to=matthew.d.roper@intel.com \
--cc=Harish.Kasiviswanathan@amd.com \
--cc=Kenny.Ho@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=cgroups@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=tj@kernel.org \
--cc=y2kenny@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox