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]
Message-ID: <CAKMK7uHXjFcVZuV-gF-mGYZVG8CbosoxWKN5MKV+rBXwEr3JZw@mail.gmail.com>
Date:   Mon, 25 May 2020 17:30:59 +0200
From:   Daniel Vetter <daniel.vetter@...ll.ch>
To:     DRI Development <dri-devel@...ts.freedesktop.org>,
        Lucas Stach <l.stach@...gutronix.de>,
        Christian Gmeiner <christian.gmeiner@...il.com>,
        Qiang Yu <yuq825@...il.com>, Rob Herring <robh@...nel.org>,
        Tomeu Vizoso <tomeu.vizoso@...labora.com>,
        Steven Price <Steven.Price@....com>,
        Alyssa Rosenzweig <alyssa@...enzweig.io>,
        "Anholt, Eric" <eric@...olt.net>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        "open list:DMA BUFFER SHARING FRAMEWORK" 
        <linux-media@...r.kernel.org>,
        "moderated list:DMA BUFFER SHARING FRAMEWORK" 
        <linaro-mm-sig@...ts.linaro.org>,
        linux-rdma <linux-rdma@...r.kernel.org>,
        amd-gfx list <amd-gfx@...ts.freedesktop.org>,
        intel-gfx <intel-gfx@...ts.freedesktop.org>,
        Chris Wilson <chris@...is-wilson.co.uk>,
        Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
        Christian König <christian.koenig@....com>,
        Daniel Vetter <daniel.vetter@...el.com>
Subject: Re: [RFC 08/17] drm/scheduler: use dma-fence annotations in main thread

On Tue, May 12, 2020 at 11:00 AM Daniel Vetter <daniel.vetter@...ll.ch> wrote:
>
> If the scheduler rt thread gets stuck on a mutex that we're holding
> while waiting for gpu workloads to complete, we have a problem.
>
> Add dma-fence annotations so that lockdep can check this for us.
>
> I've tried to quite carefully review this, and I think it's at the
> right spot. But obviosly no expert on drm scheduler.
>
> Cc: linux-media@...r.kernel.org
> Cc: linaro-mm-sig@...ts.linaro.org
> Cc: linux-rdma@...r.kernel.org
> Cc: amd-gfx@...ts.freedesktop.org
> Cc: intel-gfx@...ts.freedesktop.org
> Cc: Chris Wilson <chris@...is-wilson.co.uk>
> Cc: Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>
> Cc: Christian König <christian.koenig@....com>
> Signed-off-by: Daniel Vetter <daniel.vetter@...el.com>

Adding a bunch more people from drivers using the drm/scheduler (so
that's maintainers for etnaviv, lima, panfrost, and v3d on top of
amdgpu folks arlready on cc). Any takes or testing on this and well
the entire series very much appreciated, there's also another patch to
anotate the tdr work in this series. Plus ofc the prep work.

Thanks, Daniel

> ---
>  drivers/gpu/drm/scheduler/sched_main.c | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c
> index 2f319102ae9f..06a736e506ad 100644
> --- a/drivers/gpu/drm/scheduler/sched_main.c
> +++ b/drivers/gpu/drm/scheduler/sched_main.c
> @@ -763,9 +763,12 @@ static int drm_sched_main(void *param)
>         struct sched_param sparam = {.sched_priority = 1};
>         struct drm_gpu_scheduler *sched = (struct drm_gpu_scheduler *)param;
>         int r;
> +       bool fence_cookie;
>
>         sched_setscheduler(current, SCHED_FIFO, &sparam);
>
> +       fence_cookie = dma_fence_begin_signalling();
> +
>         while (!kthread_should_stop()) {
>                 struct drm_sched_entity *entity = NULL;
>                 struct drm_sched_fence *s_fence;
> @@ -823,6 +826,9 @@ static int drm_sched_main(void *param)
>
>                 wake_up(&sched->job_scheduled);
>         }
> +
> +       dma_fence_end_signalling(fence_cookie);
> +
>         return 0;
>  }
>
> --
> 2.26.2
>


-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ