dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Eric Anholt <eric@anholt.net>
To: Chema Casanova <jmcasanova@igalia.com>
Cc: David Airlie <airlied@linux.ie>,
	DRI Development <dri-devel@lists.freedesktop.org>,
	Yukimasa Sugizaki <ysugi@idein.jp>
Subject: Re: [PATCH 3/3] drm/v3d: Add job timeout module param
Date: Thu, 4 Feb 2021 11:34:34 -0800	[thread overview]
Message-ID: <CADaigPWcU5rB8HJWNtrb7p=icr5jFrqZnAQd-K6tWKvm0Yjr9Q@mail.gmail.com> (raw)
In-Reply-To: <0f552124-ebcf-2f7c-6aa2-9ad84f838717@igalia.com>

On Thu, Feb 4, 2021 at 10:09 AM Chema Casanova <jmcasanova@igalia.com> wrote:
>
> On 3/9/20 18:48, Yukimasa Sugizaki wrote:
> > From: Yukimasa Sugizaki <ysugi@idein.jp>
> >
> > The default timeout is 500 ms which is too short for some workloads
> > including Piglit.  Adding this parameter will help users to run heavier
> > tasks.
> >
> > Signed-off-by: Yukimasa Sugizaki <ysugi@idein.jp>
> > ---
> >   drivers/gpu/drm/v3d/v3d_sched.c | 24 +++++++++++++-----------
> >   1 file changed, 13 insertions(+), 11 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/v3d/v3d_sched.c b/drivers/gpu/drm/v3d/v3d_sched.c
> > index feef0c749e68..983efb018560 100644
> > --- a/drivers/gpu/drm/v3d/v3d_sched.c
> > +++ b/drivers/gpu/drm/v3d/v3d_sched.c
> > @@ -19,11 +19,17 @@
> >    */
> >
> >   #include <linux/kthread.h>
> > +#include <linux/moduleparam.h>
> >
> >   #include "v3d_drv.h"
> >   #include "v3d_regs.h"
> >   #include "v3d_trace.h"
> >
> > +static uint timeout = 500;
> > +module_param(timeout, uint, 0444);
> > +MODULE_PARM_DESC(timeout,
> > +     "Timeout for a job in ms (0 means infinity and default is 500 ms)");
> > +
>
> I think that  parameter definition could be included at v3d_drv.c as
> other drivers do. Then we would have all future parameters together. In
> that case we would need also to include the extern definition at
> v3d_drv.h for the driver variable.
>
> The param name could be more descriptive like "sched_timeout_ms" in the
> lima driver.
>
> I wonder if it would make sense to have different timeouts parameters
> for different type of jobs we have. At least this series come from the
> need additional time to complete compute jobs. This is what amdgpu does,
> but we probably don't need something such complex.
>
> I think it would also make sense to increase our default value for the
> compute jobs.
>
> What do you think?
>
> In any case I think that having this general scheduling timeout
> parameter as other drivers do is a good idea.

Having a param for being able to test if the job completes eventually
is a good idea, but if tests are triggering timeouts, then you
probably need to investigate what's going on in the driver -- it's not
like you want .5second unpreemptible jobs to be easy to produce.

Also, for CS, I wonder if we have another reg besides CSD_CURRENT_CFG4
we could be looking at for "we're making progress on the job".  Half a
second with no discernible progress sounds like a bug.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2021-02-04 19:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-03 16:48 [PATCH 0/3] drm/v3d: CL/CSD job timeout fixes Yukimasa Sugizaki
2020-09-03 16:48 ` [PATCH 1/3] drm/v3d: Don't resubmit guilty CSD jobs Yukimasa Sugizaki
2021-02-04 13:54   ` Chema Casanova
2020-09-03 16:48 ` [PATCH 2/3] drm/v3d: Correctly restart the timer when progress is made Yukimasa Sugizaki
2020-09-03 16:48 ` [PATCH 3/3] drm/v3d: Add job timeout module param Yukimasa Sugizaki
2021-02-04 18:09   ` Chema Casanova
2021-02-04 19:34     ` Eric Anholt [this message]
2021-02-05 12:28       ` Yukimasa Sugizaki
2021-02-10 17:59         ` Chema Casanova
2021-02-11  6:31           ` Yukimasa Sugizaki
2020-09-04  8:15 [PATCH 0/3] drm/v3d: CL/CSD job timeout fixes Yukimasa Sugizaki
2020-09-04  8:15 ` [PATCH 3/3] drm/v3d: Add job timeout module param Yukimasa Sugizaki

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='CADaigPWcU5rB8HJWNtrb7p=icr5jFrqZnAQd-K6tWKvm0Yjr9Q@mail.gmail.com' \
    --to=eric@anholt.net \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jmcasanova@igalia.com \
    --cc=ysugi@idein.jp \
    /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;
as well as URLs for NNTP newsgroup(s).