All of lore.kernel.org
 help / color / mirror / Atom feed
From: "T.J. Mercier" <tjmercier@google.com>
To: Tejun Heo <tj@kernel.org>
Cc: linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org,
	"Carlos Llamas" <cmllamas@google.com>,
	dri-devel@lists.freedesktop.org,
	"John Stultz" <jstultz@google.com>,
	"Zefan Li" <lizefan.x@bytedance.com>,
	"Kalesh Singh" <kaleshsingh@google.com>,
	"Joel Fernandes" <joel@joelfernandes.org>,
	"Shuah Khan" <shuah@kernel.org>,
	"Sumit Semwal" <sumit.semwal@linaro.org>,
	Kenny.Ho@amd.com,
	"Benjamin Gaignard" <benjamin.gaignard@collabora.com>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Martijn Coenen" <maco@android.com>,
	"Nicolas Dufresne" <nicolas@ndufresne.ca>,
	"Laura Abbott" <labbott@redhat.com>,
	kernel-team@android.com, linux-media@vger.kernel.org,
	"Todd Kjos" <tkjos@android.com>,
	linaro-mm-sig@lists.linaro.org,
	"Shuah Khan" <skhan@linuxfoundation.org>,
	cgroups@vger.kernel.org, "Suren Baghdasaryan" <surenb@google.com>,
	"Christian Brauner" <brauner@kernel.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, "Liam Mark" <lmark@codeaurora.org>,
	"Christian König" <christian.koenig@amd.com>,
	"Arve Hjønnevåg" <arve@android.com>,
	"Michal Koutný" <mkoutny@suse.com>,
	"Johannes Weiner" <hannes@cmpxchg.org>,
	"Hridya Valsaraju" <hridya@google.com>
Subject: Re: [PATCH v7 0/6] Proposal for a GPU cgroup controller
Date: Wed, 15 Jun 2022 10:31:21 -0700	[thread overview]
Message-ID: <CABdmKX0WV8VWgeafVGJ++nJ4xsJD7Wpz=3KX=BW1du=huttfvw@mail.gmail.com> (raw)
In-Reply-To: <CABdmKX2Ok023rN1drQgXVZLKUO_DVYrzmEamCgMMu6BPO67yhQ@mail.gmail.com>

On Fri, May 20, 2022 at 9:25 AM T.J. Mercier <tjmercier@google.com> wrote:
>
> On Fri, May 20, 2022 at 12:47 AM Tejun Heo <tj@kernel.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@google.com/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.
-T.J.

> > Thanks.
> >
> > --
> > tejun

WARNING: multiple messages have this Message-ID (diff)
From: "T.J. Mercier" <tjmercier@google.com>
To: Tejun Heo <tj@kernel.org>
Cc: "Nicolas Dufresne" <nicolas@ndufresne.ca>,
	"Zefan Li" <lizefan.x@bytedance.com>,
	"Johannes Weiner" <hannes@cmpxchg.org>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Arve Hjønnevåg" <arve@android.com>,
	"Todd Kjos" <tkjos@android.com>,
	"Martijn Coenen" <maco@android.com>,
	"Joel Fernandes" <joel@joelfernandes.org>,
	"Christian Brauner" <brauner@kernel.org>,
	"Hridya Valsaraju" <hridya@google.com>,
	"Suren Baghdasaryan" <surenb@google.com>,
	"Sumit Semwal" <sumit.semwal@linaro.org>,
	"Christian König" <christian.koenig@amd.com>,
	"Benjamin Gaignard" <benjamin.gaignard@collabora.com>,
	"Liam Mark" <lmark@codeaurora.org>,
	"Laura Abbott" <labbott@redhat.com>,
	"Brian Starkey" <Brian.Starkey@arm.com>,
	"John Stultz" <john.stultz@linaro.org>,
	"Shuah Khan" <shuah@kernel.org>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	"John Stultz" <jstultz@google.com>,
	"Carlos Llamas" <cmllamas@google.com>,
	"Kalesh Singh" <kaleshsingh@google.com>,
	Kenny.Ho@amd.com, "Michal Koutný" <mkoutny@suse.com>,
	"Shuah Khan" <skhan@linuxfoundation.org>,
	kernel-team@android.com, cgroups@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linaro-mm-sig@lists.linaro.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v7 0/6] Proposal for a GPU cgroup controller
Date: Wed, 15 Jun 2022 10:31:21 -0700	[thread overview]
Message-ID: <CABdmKX0WV8VWgeafVGJ++nJ4xsJD7Wpz=3KX=BW1du=huttfvw@mail.gmail.com> (raw)
In-Reply-To: <CABdmKX2Ok023rN1drQgXVZLKUO_DVYrzmEamCgMMu6BPO67yhQ@mail.gmail.com>

On Fri, May 20, 2022 at 9:25 AM T.J. Mercier <tjmercier@google.com> wrote:
>
> On Fri, May 20, 2022 at 12:47 AM Tejun Heo <tj@kernel.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@google.com/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.
-T.J.

> > Thanks.
> >
> > --
> > tejun

WARNING: multiple messages have this Message-ID (diff)
From: "T.J. Mercier" <tjmercier@google.com>
To: Tejun Heo <tj@kernel.org>
Cc: "Nicolas Dufresne" <nicolas@ndufresne.ca>,
	"Zefan Li" <lizefan.x@bytedance.com>,
	"Johannes Weiner" <hannes@cmpxchg.org>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Arve Hjønnevåg" <arve@android.com>,
	"Todd Kjos" <tkjos@android.com>,
	"Martijn Coenen" <maco@android.com>,
	"Joel Fernandes" <joel@joelfernandes.org>,
	"Christian Brauner" <brauner@kernel.org>,
	"Hridya Valsaraju" <hridya@google.com>,
	"Suren Baghdasaryan" <surenb@google.com>,
	"Sumit Semwal" <sumit.semwal@linaro.org>,
	"Christian König" <christian.koenig@amd.com>,
	"Benjamin Gaignard" <benjamin.gaignard@collabora.com>,
	"Liam Mark" <lmark@codeaurora.org>,
	"Laura Abbott" <labbott@redhat.com>,
	"Brian Starkey" <Brian.Starkey@arm.com>
Subject: Re: [PATCH v7 0/6] Proposal for a GPU cgroup controller
Date: Wed, 15 Jun 2022 10:31:21 -0700	[thread overview]
Message-ID: <CABdmKX0WV8VWgeafVGJ++nJ4xsJD7Wpz=3KX=BW1du=huttfvw@mail.gmail.com> (raw)
In-Reply-To: <CABdmKX2Ok023rN1drQgXVZLKUO_DVYrzmEamCgMMu6BPO67yhQ@mail.gmail.com>

On Fri, May 20, 2022 at 9:25 AM T.J. Mercier <tjmercier@google.com> wrote:
>
> On Fri, May 20, 2022 at 12:47 AM Tejun Heo <tj@kernel.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@google.com/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.
-T.J.

> > Thanks.
> >
> > --
> > tejun

  reply	other threads:[~2022-06-15 17:31 UTC|newest]

Thread overview: 67+ 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 ` T.J. Mercier
2022-05-10 23:56 ` T.J. Mercier
2022-05-10 23:56 ` [PATCH v7 1/6] gpu: rfc: " T.J. Mercier
2022-05-10 23:56   ` T.J. Mercier
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   ` T.J. Mercier
2022-05-10 23:56 ` [PATCH v7 3/6] dmabuf: heaps: export system_heap buffers with GPU cgroup charging T.J. Mercier
2022-05-10 23:56   ` T.J. Mercier
2022-05-10 23:56 ` [PATCH v7 4/6] dmabuf: Add gpu cgroup charge transfer function T.J. Mercier
2022-05-10 23:56   ` T.J. Mercier
2022-05-10 23:56   ` T.J. Mercier
2022-05-10 23:56 ` [PATCH v7 5/6] binder: Add flags to relinquish ownership of fds T.J. Mercier
2022-05-10 23:56   ` T.J. Mercier
2022-05-10 23:56 ` [PATCH v7 6/6] selftests: Add binder cgroup gpu memory transfer tests T.J. Mercier
2022-05-21 10:15   ` Muhammad Usama Anjum
2022-05-11 13:21 ` [PATCH v7 0/6] Proposal for a GPU cgroup controller Nicolas Dufresne
2022-05-11 13:21   ` Nicolas Dufresne
2022-05-11 13:21   ` Nicolas Dufresne
2022-05-11 20:31   ` T.J. Mercier
2022-05-11 20:31     ` T.J. Mercier
2022-05-11 20:31     ` T.J. Mercier
2022-05-12 13:09     ` Nicolas Dufresne
2022-05-12 13:09       ` Nicolas Dufresne
2022-05-12 13:09       ` Nicolas Dufresne
2022-05-13  3:43       ` T.J. Mercier
2022-05-13  3:43         ` T.J. Mercier
2022-05-13  3:43         ` T.J. Mercier
2022-05-13 16:13         ` Tejun Heo
2022-05-13 16:13           ` Tejun Heo
2022-05-13 16:13           ` Tejun Heo
2022-05-17 23:30           ` T.J. Mercier
2022-05-17 23:30             ` T.J. Mercier
2022-05-17 23:30             ` T.J. Mercier
2022-05-20  7:47             ` Tejun Heo
2022-05-20  7:47               ` Tejun Heo
2022-05-20  7:47               ` Tejun Heo
2022-05-20 16:25               ` T.J. Mercier
2022-05-20 16:25                 ` T.J. Mercier
2022-05-20 16:25                 ` T.J. Mercier
2022-06-15 17:31                 ` T.J. Mercier [this message]
2022-06-15 17:31                   ` T.J. Mercier
2022-06-15 17:31                   ` T.J. Mercier
2022-06-24 20:17                   ` Daniel Vetter
2022-06-24 20:17                     ` Daniel Vetter
2022-06-24 20:17                     ` Daniel Vetter
     [not found]                     ` <YrYbwu0iIAJJGXVg-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2022-06-24 20:32                       ` John Stultz
2022-06-24 20:32                     ` John Stultz
2022-06-24 20:32                       ` John Stultz
2022-06-24 20:36                       ` Daniel Vetter
2022-06-24 20:36                         ` Daniel Vetter
2022-06-24 20:36                         ` Daniel Vetter
     [not found]                         ` <YrYgWCTtZqfvCt5D-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2022-06-24 21:17                           ` T.J. Mercier
2022-06-24 21:17                         ` T.J. Mercier
2022-06-24 21:17                           ` T.J. Mercier
2022-05-19  9:30 ` [PATCH v7 1/6] gpu: rfc: " eballetbo
2022-05-19  9:30   ` eballetbo
2022-05-19  9:30   ` eballetbo
2022-05-21  2:19   ` T.J. Mercier
2022-05-21  2:19     ` T.J. Mercier
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-19 10:52   ` eballetbo
2022-05-19 10:52   ` eballetbo
2022-05-20 16:33   ` T.J. Mercier
2022-05-20 16:33     ` T.J. Mercier
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='CABdmKX0WV8VWgeafVGJ++nJ4xsJD7Wpz=3KX=BW1du=huttfvw@mail.gmail.com' \
    --to=tjmercier@google.com \
    --cc=Kenny.Ho@amd.com \
    --cc=arve@android.com \
    --cc=benjamin.gaignard@collabora.com \
    --cc=brauner@kernel.org \
    --cc=cgroups@vger.kernel.org \
    --cc=christian.koenig@amd.com \
    --cc=cmllamas@google.com \
    --cc=corbet@lwn.net \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=hridya@google.com \
    --cc=joel@joelfernandes.org \
    --cc=jstultz@google.com \
    --cc=kaleshsingh@google.com \
    --cc=kernel-team@android.com \
    --cc=labbott@redhat.com \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=lizefan.x@bytedance.com \
    --cc=lmark@codeaurora.org \
    --cc=maco@android.com \
    --cc=mkoutny@suse.com \
    --cc=nicolas@ndufresne.ca \
    --cc=shuah@kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=sumit.semwal@linaro.org \
    --cc=surenb@google.com \
    --cc=tj@kernel.org \
    --cc=tkjos@android.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.