Re: [PATCH 16/17] cgroup/drm: Expose memory stats

2023-07-28 Thread Tvrtko Ursulin
One additional thought on one sub-topic: On 27/07/2023 18:08, Tvrtko Ursulin wrote: [snip] For something like this,  you would probably want it to work inside the drm scheduler first. Presumably, this can be done by setting a weight on each runqueue, and perhaps adding a callback to update

Re: [PATCH 16/17] cgroup/drm: Expose memory stats

2023-07-27 Thread Tvrtko Ursulin
On 27/07/2023 12:54, Maarten Lankhorst wrote: Hey, On 2023-07-26 13:41, Tvrtko Ursulin wrote: On 26/07/2023 11:14, Maarten Lankhorst wrote: Hey, On 2023-07-22 00:21, Tejun Heo wrote: On Wed, Jul 12, 2023 at 12:46:04PM +0100, Tvrtko Ursulin wrote:    $ cat drm.memory.stat    card0 region=

Re: [PATCH 16/17] cgroup/drm: Expose memory stats

2023-07-27 Thread Tvrtko Ursulin
On 27/07/2023 14:42, Maarten Lankhorst wrote: On 2023-07-26 21:44, Tejun Heo wrote: Hello, On Wed, Jul 26, 2023 at 12:14:24PM +0200, Maarten Lankhorst wrote: So, yeah, if you want to add memory controls, we better think through how the fd ownership migration should work. I've taken a look

Re: [PATCH 16/17] cgroup/drm: Expose memory stats

2023-07-27 Thread Maarten Lankhorst
Hey, On 2023-07-26 21:44, Tejun Heo wrote: Hello, On Wed, Jul 26, 2023 at 12:14:24PM +0200, Maarten Lankhorst wrote: So, yeah, if you want to add memory controls, we better think through how the fd ownership migration should work. I've taken a look at the series, since I have been working on

Re: [PATCH 16/17] cgroup/drm: Expose memory stats

2023-07-27 Thread Maarten Lankhorst
Hey, On 2023-07-26 13:41, Tvrtko Ursulin wrote: On 26/07/2023 11:14, Maarten Lankhorst wrote: Hey, On 2023-07-22 00:21, Tejun Heo wrote: On Wed, Jul 12, 2023 at 12:46:04PM +0100, Tvrtko Ursulin wrote:    $ cat drm.memory.stat    card0 region=system total=12898304 shared=0 active=0 resident

Re: [PATCH 16/17] cgroup/drm: Expose memory stats

2023-07-26 Thread Tejun Heo
Hello, On Wed, Jul 26, 2023 at 05:44:28PM +0100, Tvrtko Ursulin wrote: ... > > So, yeah, if you want to add memory controls, we better think through how > > the fd ownership migration should work. > > It would be quite easy to make the implicit migration fail - just the matter > of failing the fi

Re: [PATCH 16/17] cgroup/drm: Expose memory stats

2023-07-26 Thread Tejun Heo
Hello, On Wed, Jul 26, 2023 at 12:14:24PM +0200, Maarten Lankhorst wrote: > > So, yeah, if you want to add memory controls, we better think through how > > the fd ownership migration should work. > > I've taken a look at the series, since I have been working on cgroup memory > eviction. > > The s

Re: [PATCH 16/17] cgroup/drm: Expose memory stats

2023-07-26 Thread Tvrtko Ursulin
On 21/07/2023 23:21, Tejun Heo wrote: On Wed, Jul 12, 2023 at 12:46:04PM +0100, Tvrtko Ursulin wrote: $ cat drm.memory.stat card0 region=system total=12898304 shared=0 active=0 resident=12111872 purgeable=167936 card0 region=stolen-system total=0 shared=0 active=0 resident=0 purgeabl

Re: [PATCH 16/17] cgroup/drm: Expose memory stats

2023-07-26 Thread Tvrtko Ursulin
On 26/07/2023 11:14, Maarten Lankhorst wrote: Hey, On 2023-07-22 00:21, Tejun Heo wrote: On Wed, Jul 12, 2023 at 12:46:04PM +0100, Tvrtko Ursulin wrote:    $ cat drm.memory.stat    card0 region=system total=12898304 shared=0 active=0 resident=12111872 purgeable=167936    card0 region=stolen

Re: [PATCH 16/17] cgroup/drm: Expose memory stats

2023-07-26 Thread Maarten Lankhorst
Hey, On 2023-07-22 00:21, Tejun Heo wrote: On Wed, Jul 12, 2023 at 12:46:04PM +0100, Tvrtko Ursulin wrote: $ cat drm.memory.stat card0 region=system total=12898304 shared=0 active=0 resident=12111872 purgeable=167936 card0 region=stolen-system total=0 shared=0 active=0 resident=0 purg

Re: [PATCH 16/17] cgroup/drm: Expose memory stats

2023-07-21 Thread Tejun Heo
On Wed, Jul 12, 2023 at 12:46:04PM +0100, Tvrtko Ursulin wrote: > $ cat drm.memory.stat > card0 region=system total=12898304 shared=0 active=0 resident=12111872 > purgeable=167936 > card0 region=stolen-system total=0 shared=0 active=0 resident=0 purgeable=0 > > Data is generated on demand f

[PATCH 16/17] cgroup/drm: Expose memory stats

2023-07-12 Thread Tvrtko Ursulin
From: Tvrtko Ursulin With a few DRM drivers exposing per client memory stats via the fdinfo interface already, we can add support for exposing the same data (albeit aggregated for cgroup hierarchies) via the drm cgroup controller. Add some driver callbacks and controller code to use them, walkin