From: Daniel Vetter <daniel-/w4YWyX8dFk@public.gmane.org>
To: "T.J. Mercier" <tjmercier-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
Cc: "Tejun Heo" <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"Nicolas Dufresne"
<nicolas-dDhyB4GVkw9AFePFGvp55w@public.gmane.org>,
"Zefan Li" <lizefan.x-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org>,
"Johannes Weiner"
<hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>,
"Jonathan Corbet" <corbet-T1hC0tSOHrs@public.gmane.org>,
"Greg Kroah-Hartman"
<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
"Arve Hjønnevåg" <arve-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>,
"Todd Kjos" <tkjos-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>,
"Martijn Coenen" <maco-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org>,
"Joel Fernandes"
<joel-QYYGw3jwrUn5owFQY34kdNi2O/JbrIOy@public.gmane.org>,
"Christian Brauner"
<brauner-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"Hridya Valsaraju"
<hridya-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
"Suren Baghdasaryan"
<surenb-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
"Sumit Semwal"
<sumit.semwal-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
"Christian König" <christian.koenig-5C7GfCeVMHo@public.gmane.org>,
"Benjamin Gaignard"
<benjamin.gaignard-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>,
"Liam Mark" <lmark-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
"Laura Abbott" <labbott-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
"Brian Starkey" <Brian.Starkey@a>
Subject: Re: [PATCH v7 0/6] Proposal for a GPU cgroup controller
Date: Fri, 24 Jun 2022 22:17:06 +0200 [thread overview]
Message-ID: <YrYbwu0iIAJJGXVg@phenom.ffwll.local> (raw)
In-Reply-To: <CABdmKX0WV8VWgeafVGJ++nJ4xsJD7Wpz=3KX=BW1du=huttfvw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Wed, Jun 15, 2022 at 10:31:21AM -0700, T.J. Mercier wrote:
> On Fri, May 20, 2022 at 9:25 AM T.J. Mercier <tjmercier-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> wrote:
> >
> > On Fri, May 20, 2022 at 12:47 AM Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
> > >
> > > Hello,
> > >
> > > On Tue, May 17, 2022 at 04:30:29PM -0700, T.J. Mercier wrote:
> > > > Thanks for your suggestion. This almost works. "dmabuf" as a key could
> > > > work, but I'd actually like to account for each heap. Since heaps can
> > > > be dynamically added, I can't accommodate every potential heap name by
> > > > hardcoding registrations in the misc controller.
> > >
> > > On its own, that's a pretty weak reason to be adding a separate gpu
> > > controller especially given that it doesn't really seem to be one with
> > > proper abstractions for gpu resources. We don't want to keep adding random
> > > keys to misc controller but can definitely add limited flexibility. What
> > > kind of keys do you need?
> > >
> > Well the dmabuf-from-heaps component of this is the initial use case.
> > I was envisioning we'd have additional keys as discussed here:
> > https://lore.kernel.org/lkml/20220328035951.1817417-1-tjmercier-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org/T/#m82e5fe9d8674bb60160701e52dae4356fea2ddfa
> > So we'd end up with a well-defined core set of keys like "system", and
> > then drivers would be free to use their own keys for their own unique
> > purposes which could be complementary or orthogonal to the core set.
> > Yesterday I was talking with someone who is interested in limiting gpu
> > cores and bus IDs in addition to gpu memory. How to define core keys
> > is the part where it looks like there's trouble.
> >
> > For my use case it would be sufficient to have current and maximum
> > values for an arbitrary number of keys - one per heap. So the only
> > part missing from the misc controller (for my use case) is the ability
> > to register a new key at runtime as heaps are added. Instead of
> > keeping track of resources with enum misc_res_type, requesting a
> > resource handle/ID from the misc controller at runtime is what I think
> > would be required instead.
> >
> Quick update: I'm going to make an attempt to modify the misc
> controller to support a limited amount of dynamic resource
> registration/tracking in place of the new controller in this series.
>
> Thanks everyone for the feedback.
Somehow I missed this entire chain here.
I'm not a fan, because I'm kinda hoping we could finally unify gpu memory
account. Atm everyone just adds their one-off solution in a random corner:
- total tracking in misc cgroup controller
- dma-buf sysfs files (except apparently too slow so it'll get deleted
again)
- random other stuff on open device files os OOM killer can see it
This doesn't look good.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
next prev parent reply other threads:[~2022-06-24 20:17 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-10 23:56 [PATCH v7 0/6] Proposal for a GPU cgroup controller T.J. Mercier
2022-05-10 23:56 ` [PATCH v7 1/6] gpu: rfc: " T.J. Mercier
[not found] ` <20220510235653.933868-1-tjmercier-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2022-05-10 23:56 ` [PATCH v7 2/6] cgroup: gpu: Add a cgroup controller for allocator attribution of GPU memory T.J. Mercier
2022-05-10 23:56 ` [PATCH v7 4/6] dmabuf: Add gpu cgroup charge transfer function T.J. Mercier
2022-05-11 13:21 ` [PATCH v7 0/6] Proposal for a GPU cgroup controller Nicolas Dufresne
2022-05-11 20:31 ` T.J. Mercier
[not found] ` <CABdmKX3ZV6-u-oLvW_wWavAMBfrsZ=C_rCgK_Uz4VjxcRvRFew-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-05-12 13:09 ` Nicolas Dufresne
2022-05-13 3:43 ` T.J. Mercier
2022-05-13 16:13 ` Tejun Heo
2022-05-17 23:30 ` T.J. Mercier
2022-05-20 7:47 ` Tejun Heo
2022-05-20 16:25 ` T.J. Mercier
2022-06-15 17:31 ` T.J. Mercier
[not found] ` <CABdmKX0WV8VWgeafVGJ++nJ4xsJD7Wpz=3KX=BW1du=huttfvw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-06-24 20:17 ` Daniel Vetter [this message]
[not found] ` <YrYbwu0iIAJJGXVg-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2022-06-24 20:32 ` John Stultz
[not found] ` <CANDhNCqGjaq-SFvWwkqnEFj4tJcRqCYupZ03wLyCexqTH5MqMg@mail.gmail.com>
[not found] ` <CANDhNCqGjaq-SFvWwkqnEFj4tJcRqCYupZ03wLyCexqTH5MqMg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-06-24 20:36 ` Daniel Vetter
[not found] ` <YrYgWCTtZqfvCt5D-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2022-06-24 21:17 ` T.J. Mercier
2022-05-19 9:30 ` [PATCH v7 1/6] gpu: rfc: " eballetbo
[not found] ` <20220519093034.541481-1-eballetbo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2022-05-21 2:19 ` T.J. Mercier
2022-05-19 10:52 ` [PATCH v7 2/6] cgroup: gpu: Add a cgroup controller for allocator attribution of GPU memory eballetbo
2022-05-20 16:33 ` T.J. Mercier
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=YrYbwu0iIAJJGXVg@phenom.ffwll.local \
--to=daniel-/w4ywyx8dfk@public.gmane.org \
--cc=Brian.Starkey@a \
--cc=arve-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
--cc=benjamin.gaignard-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org \
--cc=brauner-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=christian.koenig-5C7GfCeVMHo@public.gmane.org \
--cc=corbet-T1hC0tSOHrs@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org \
--cc=hridya-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=joel-QYYGw3jwrUn5owFQY34kdNi2O/JbrIOy@public.gmane.org \
--cc=labbott-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=lizefan.x-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org \
--cc=lmark-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=maco-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \
--cc=nicolas-dDhyB4GVkw9AFePFGvp55w@public.gmane.org \
--cc=sumit.semwal-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=surenb-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=tjmercier-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=tkjos-z5hGa2qSFaRBDgjK7y7TUQ@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