lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 27 Oct 2023 09:39:43 +0200
From:   Boris Brezillon <boris.brezillon@...labora.com>
To:     Christian König <christian.koenig@....com>
Cc:     Danilo Krummrich <dakr@...hat.com>, airlied@...il.com,
        daniel@...ll.ch, matthew.brost@...el.com, faith@...strand.net,
        luben.tuikov@....com, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH drm-misc-next v3] drm/sched: implement dynamic job-flow
 control

On Fri, 27 Oct 2023 09:35:01 +0200
Christian König <christian.koenig@....com> wrote:

> Am 27.10.23 um 09:32 schrieb Boris Brezillon:
> > On Fri, 27 Oct 2023 09:22:12 +0200
> > Christian König <christian.koenig@....com> wrote:
> >  
> >>> +
> >>> +	/**
> >>> +	 * @update_job_credits: Called once the scheduler is considering this
> >>> +	 * job for execution.
> >>> +	 *
> >>> +	 * Drivers may use this to update the job's submission credits, which is
> >>> +	 * useful to e.g. deduct the number of native fences which have been
> >>> +	 * signaled meanwhile.
> >>> +	 *
> >>> +	 * The callback must either return the new number of submission credits
> >>> +	 * for the given job, or zero if no update is required.
> >>> +	 *
> >>> +	 * This callback is optional.
> >>> +	 */
> >>> +	u32 (*update_job_credits)(struct drm_sched_job *sched_job);  
> >> Why do we need an extra callback for this?
> >>
> >> Just document that prepare_job() is allowed to reduce the number of
> >> credits the job might need.
> > ->prepare_job() is called only once if the returned fence is NULL, but  
> > we need this credit-update to happen every time a job is considered for
> > execution by the scheduler.  
> 
> But the job is only considered for execution once. How do you see that 
> this is called multiple times?

Nope, it's not. If drm_sched_can_queue() returns false, the scheduler
will go look for another entity that has a job ready for execution, and
get back to this entity later, and test drm_sched_can_queue() again.
Basically, any time drm_sched_can_queue() is called, the job credits
update should happen, so we have an accurate view of how many credits
this job needs.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ