Re: [PATCH v4 04/40] drm/sched: Add enqueue credit limit

2025-05-22 Thread Danilo Krummrich
On Thu, May 22, 2025 at 07:31:28PM -0700, Rob Clark wrote: > On Thu, May 22, 2025 at 8:53 AM Danilo Krummrich wrote: > > On Thu, May 22, 2025 at 07:47:17AM -0700, Rob Clark wrote: > > > On Thu, May 22, 2025 at 4:00 AM Danilo Krummrich wrote: > > > > Ok, but what about the other way around? What's

Re: [PATCH v4 04/40] drm/sched: Add enqueue credit limit

2025-05-22 Thread Rob Clark
On Thu, May 22, 2025 at 8:53 AM Danilo Krummrich wrote: > > On Thu, May 22, 2025 at 07:47:17AM -0700, Rob Clark wrote: > > On Thu, May 22, 2025 at 4:00 AM Danilo Krummrich wrote: > > > On Tue, May 20, 2025 at 10:22:54AM -0700, Rob Clark wrote: > > > > On Tue, May 20, 2025 at 9:54 AM Danilo Krummr

Re: [PATCH v4 04/40] drm/sched: Add enqueue credit limit

2025-05-22 Thread Danilo Krummrich
On Thu, May 22, 2025 at 07:47:17AM -0700, Rob Clark wrote: > On Thu, May 22, 2025 at 4:00 AM Danilo Krummrich wrote: > > On Tue, May 20, 2025 at 10:22:54AM -0700, Rob Clark wrote: > > > On Tue, May 20, 2025 at 9:54 AM Danilo Krummrich wrote: > > > > On Tue, May 20, 2025 at 09:07:05AM -0700, Rob C

Re: [PATCH v4 04/40] drm/sched: Add enqueue credit limit

2025-05-22 Thread Rob Clark
On Thu, May 22, 2025 at 4:00 AM Danilo Krummrich wrote: > > On Tue, May 20, 2025 at 10:22:54AM -0700, Rob Clark wrote: > > On Tue, May 20, 2025 at 9:54 AM Danilo Krummrich wrote: > > > On Tue, May 20, 2025 at 09:07:05AM -0700, Rob Clark wrote: > > > > On Tue, May 20, 2025 at 12:06 AM Danilo Krumm

Re: [PATCH v4 04/40] drm/sched: Add enqueue credit limit

2025-05-22 Thread Danilo Krummrich
On Tue, May 20, 2025 at 10:22:54AM -0700, Rob Clark wrote: > On Tue, May 20, 2025 at 9:54 AM Danilo Krummrich wrote: > > On Tue, May 20, 2025 at 09:07:05AM -0700, Rob Clark wrote: > > > On Tue, May 20, 2025 at 12:06 AM Danilo Krummrich wrote: > > > > But let's assume we agree that we want to avoi

Re: [PATCH v4 04/40] drm/sched: Add enqueue credit limit

2025-05-20 Thread Rob Clark
On Tue, May 20, 2025 at 9:54 AM Danilo Krummrich wrote: > > On Tue, May 20, 2025 at 09:07:05AM -0700, Rob Clark wrote: > > On Tue, May 20, 2025 at 12:06 AM Danilo Krummrich wrote: > > > > > > On Thu, May 15, 2025 at 12:56:38PM -0700, Rob Clark wrote: > > > > On Thu, May 15, 2025 at 11:56 AM Danil

Re: [PATCH v4 04/40] drm/sched: Add enqueue credit limit

2025-05-20 Thread Connor Abbott
n Tue, May 20, 2025 at 12:54 PM Danilo Krummrich wrote: > > On Tue, May 20, 2025 at 09:07:05AM -0700, Rob Clark wrote: > > On Tue, May 20, 2025 at 12:06 AM Danilo Krummrich wrote: > > > > > > On Thu, May 15, 2025 at 12:56:38PM -0700, Rob Clark wrote: > > > > On Thu, May 15, 2025 at 11:56 AM Danil

Re: [PATCH v4 04/40] drm/sched: Add enqueue credit limit

2025-05-20 Thread Danilo Krummrich
On Tue, May 20, 2025 at 09:07:05AM -0700, Rob Clark wrote: > On Tue, May 20, 2025 at 12:06 AM Danilo Krummrich wrote: > > > > On Thu, May 15, 2025 at 12:56:38PM -0700, Rob Clark wrote: > > > On Thu, May 15, 2025 at 11:56 AM Danilo Krummrich wrote: > > > > > > > > On Thu, May 15, 2025 at 10:40:15A

Re: [PATCH v4 04/40] drm/sched: Add enqueue credit limit

2025-05-20 Thread Rob Clark
On Tue, May 20, 2025 at 12:06 AM Danilo Krummrich wrote: > > On Thu, May 15, 2025 at 12:56:38PM -0700, Rob Clark wrote: > > On Thu, May 15, 2025 at 11:56 AM Danilo Krummrich wrote: > > > > > > On Thu, May 15, 2025 at 10:40:15AM -0700, Rob Clark wrote: > > > > On Thu, May 15, 2025 at 10:30 AM Dani

Re: [PATCH v4 04/40] drm/sched: Add enqueue credit limit

2025-05-20 Thread Danilo Krummrich
On Thu, May 15, 2025 at 12:56:38PM -0700, Rob Clark wrote: > On Thu, May 15, 2025 at 11:56 AM Danilo Krummrich wrote: > > > > On Thu, May 15, 2025 at 10:40:15AM -0700, Rob Clark wrote: > > > On Thu, May 15, 2025 at 10:30 AM Danilo Krummrich wrote: > > > > > > > > (Cc: Boris) > > > > > > > > On Th

Re: [PATCH v4 04/40] drm/sched: Add enqueue credit limit

2025-05-15 Thread Rob Clark
On Thu, May 15, 2025 at 11:56 AM Danilo Krummrich wrote: > > On Thu, May 15, 2025 at 10:40:15AM -0700, Rob Clark wrote: > > On Thu, May 15, 2025 at 10:30 AM Danilo Krummrich wrote: > > > > > > (Cc: Boris) > > > > > > On Thu, May 15, 2025 at 12:22:18PM -0400, Connor Abbott wrote: > > > > For some

Re: [PATCH v4 04/40] drm/sched: Add enqueue credit limit

2025-05-15 Thread Danilo Krummrich
On Thu, May 15, 2025 at 10:40:15AM -0700, Rob Clark wrote: > On Thu, May 15, 2025 at 10:30 AM Danilo Krummrich wrote: > > > > (Cc: Boris) > > > > On Thu, May 15, 2025 at 12:22:18PM -0400, Connor Abbott wrote: > > > For some context, other drivers have the concept of a "synchronous" > > > VM_BIND i

Re: [PATCH v4 04/40] drm/sched: Add enqueue credit limit

2025-05-15 Thread Rob Clark
On Thu, May 15, 2025 at 10:30 AM Danilo Krummrich wrote: > > (Cc: Boris) > > On Thu, May 15, 2025 at 12:22:18PM -0400, Connor Abbott wrote: > > For some context, other drivers have the concept of a "synchronous" > > VM_BIND ioctl which completes immediately, and drivers implement it by > > waiting

Re: [PATCH v4 04/40] drm/sched: Add enqueue credit limit

2025-05-15 Thread Rob Clark
On Thu, May 15, 2025 at 10:23 AM Danilo Krummrich wrote: > > On Thu, May 15, 2025 at 09:15:08AM -0700, Rob Clark wrote: > > Basically it is a way to throttle userspace to prevent it from OoM'ing > > itself. (I suppose userspace could throttle itself, but it doesn't > > really know how much pre-al

Re: [PATCH v4 04/40] drm/sched: Add enqueue credit limit

2025-05-15 Thread Danilo Krummrich
(Cc: Boris) On Thu, May 15, 2025 at 12:22:18PM -0400, Connor Abbott wrote: > For some context, other drivers have the concept of a "synchronous" > VM_BIND ioctl which completes immediately, and drivers implement it by > waiting for the whole thing to finish before returning. Nouveau implements sy

Re: [PATCH v4 04/40] drm/sched: Add enqueue credit limit

2025-05-15 Thread Danilo Krummrich
On Thu, May 15, 2025 at 09:15:08AM -0700, Rob Clark wrote: > Basically it is a way to throttle userspace to prevent it from OoM'ing > itself. (I suppose userspace could throttle itself, but it doesn't > really know how much pre-allocation will need to be done for pgtable > updates.) I assume you

Re: [PATCH v4 04/40] drm/sched: Add enqueue credit limit

2025-05-15 Thread Connor Abbott
On Thu, May 15, 2025 at 12:15 PM Rob Clark wrote: > > On Thu, May 15, 2025 at 2:28 AM Philipp Stanner wrote: > > > > Hello, > > > > On Wed, 2025-05-14 at 09:59 -0700, Rob Clark wrote: > > > From: Rob Clark > > > > > > Similar to the existing credit limit mechanism, but applying to jobs > > > enq

Re: [PATCH v4 04/40] drm/sched: Add enqueue credit limit

2025-05-15 Thread Rob Clark
On Thu, May 15, 2025 at 2:28 AM Philipp Stanner wrote: > > Hello, > > On Wed, 2025-05-14 at 09:59 -0700, Rob Clark wrote: > > From: Rob Clark > > > > Similar to the existing credit limit mechanism, but applying to jobs > > enqueued to the scheduler but not yet run. > > > > The use case is to put

Re: [PATCH v4 04/40] drm/sched: Add enqueue credit limit

2025-05-15 Thread Philipp Stanner
Hello, On Wed, 2025-05-14 at 09:59 -0700, Rob Clark wrote: > From: Rob Clark > > Similar to the existing credit limit mechanism, but applying to jobs > enqueued to the scheduler but not yet run. > > The use case is to put an upper bound on preallocated, and > potentially > unneeded, pgtable pag

[PATCH v4 04/40] drm/sched: Add enqueue credit limit

2025-05-14 Thread Rob Clark
From: Rob Clark Similar to the existing credit limit mechanism, but applying to jobs enqueued to the scheduler but not yet run. The use case is to put an upper bound on preallocated, and potentially unneeded, pgtable pages. When this limit is exceeded, pushing new jobs will block until the coun

[PATCH v4 04/40] drm/sched: Add enqueue credit limit

2025-05-14 Thread Rob Clark
From: Rob Clark Similar to the existing credit limit mechanism, but applying to jobs enqueued to the scheduler but not yet run. The use case is to put an upper bound on preallocated, and potentially unneeded, pgtable pages. When this limit is exceeded, pushing new jobs will block until the coun