All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrey Grodzovsky <Andrey.Grodzovsky-5C7GfCeVMHo@public.gmane.org>
To: Nayan Deshmukh <nayan26deshmukh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	eric-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org,
	Maling list - DRI developers
	<dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
	alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	christian.koenig-5C7GfCeVMHo@public.gmane.org,
	l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org
Subject: Re: [PATCH 3/4] drm/scheduler: add new function to get least loaded sched v2
Date: Wed, 1 Aug 2018 13:51:31 -0400	[thread overview]
Message-ID: <6a065950-20c7-2c5a-9413-390d95126f07@amd.com> (raw)
In-Reply-To: <CAFd4ddx8D2iKquRu4YVh1gnRMpLFgWf3CBPdk5SD-nJ8dNXEPQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 2983 bytes --]

Series is Acked-by: Andrey Grodzovsky <andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>

Andrey


On 08/01/2018 12:06 PM, Nayan Deshmukh wrote:
> Yes, that is correct.
>
> Nayan
>
> On Wed, Aug 1, 2018, 9:05 PM Andrey Grodzovsky 
> <Andrey.Grodzovsky-5C7GfCeVMHo@public.gmane.org <mailto:Andrey.Grodzovsky-5C7GfCeVMHo@public.gmane.org>> wrote:
>
>     Clarification question -  if the run queues belong to different
>     schedulers they effectively point to different rings,
>
>     it means we allow to move (reschedule) a drm_sched_entity from one
>     ring
>     to another - i assume that the idea int the first place, that
>
>     you have a set of HW rings and you can utilize any of them for
>     your jobs
>     (like compute rings). Correct ?
>
>     Andrey
>
>
>     On 08/01/2018 04:20 AM, Nayan Deshmukh wrote:
>     > The function selects the run queue from the rq_list with the
>     > least load. The load is decided by the number of jobs in a
>     > scheduler.
>     >
>     > v2: avoid using atomic read twice consecutively, instead store
>     >      it locally
>     >
>     > Signed-off-by: Nayan Deshmukh <nayan26deshmukh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
>     <mailto:nayan26deshmukh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>>
>     > ---
>     >   drivers/gpu/drm/scheduler/gpu_scheduler.c | 25
>     +++++++++++++++++++++++++
>     >   1 file changed, 25 insertions(+)
>     >
>     > diff --git a/drivers/gpu/drm/scheduler/gpu_scheduler.c
>     b/drivers/gpu/drm/scheduler/gpu_scheduler.c
>     > index 375f6f7f6a93..fb4e542660b0 100644
>     > --- a/drivers/gpu/drm/scheduler/gpu_scheduler.c
>     > +++ b/drivers/gpu/drm/scheduler/gpu_scheduler.c
>     > @@ -255,6 +255,31 @@ static bool
>     drm_sched_entity_is_ready(struct drm_sched_entity *entity)
>     >       return true;
>     >   }
>     >
>     > +/**
>     > + * drm_sched_entity_get_free_sched - Get the rq from rq_list
>     with least load
>     > + *
>     > + * @entity: scheduler entity
>     > + *
>     > + * Return the pointer to the rq with least load.
>     > + */
>     > +static struct drm_sched_rq *
>     > +drm_sched_entity_get_free_sched(struct drm_sched_entity *entity)
>     > +{
>     > +     struct drm_sched_rq *rq = NULL;
>     > +     unsigned int min_jobs = UINT_MAX, num_jobs;
>     > +     int i;
>     > +
>     > +     for (i = 0; i < entity->num_rq_list; ++i) {
>     > +             num_jobs =
>     atomic_read(&entity->rq_list[i]->sched->num_jobs);
>     > +             if (num_jobs < min_jobs) {
>     > +                     min_jobs = num_jobs;
>     > +                     rq = entity->rq_list[i];
>     > +             }
>     > +     }
>     > +
>     > +     return rq;
>     > +}
>     > +
>     >   static void drm_sched_entity_kill_jobs_cb(struct dma_fence *f,
>     >                                   struct dma_fence_cb *cb)
>     >   {
>


[-- Attachment #1.2: Type: text/html, Size: 4866 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2018-08-01 17:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-01  8:19 [PATCH 1/4] drm/scheduler: add a list of run queues to the entity Nayan Deshmukh
2018-08-01  8:20 ` [PATCH 4/4] drm/scheduler: move idle entities to scheduler with less load v2 Nayan Deshmukh
     [not found] ` <20180801082002.20696-1-nayan26deshmukh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-08-01  8:20   ` [PATCH 2/4] drm/scheduler: add counter for total jobs in scheduler Nayan Deshmukh
     [not found]     ` <20180801082002.20696-2-nayan26deshmukh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-08-01 13:15       ` Huang Rui
2018-08-01 13:06         ` Christian König
2018-08-02  2:57           ` Huang Rui
2018-08-02  6:11             ` Nayan Deshmukh
2018-08-01  8:20   ` [PATCH 3/4] drm/scheduler: add new function to get least loaded sched v2 Nayan Deshmukh
2018-08-01 15:35     ` Andrey Grodzovsky
2018-08-01 16:06       ` Nayan Deshmukh
     [not found]         ` <CAFd4ddx8D2iKquRu4YVh1gnRMpLFgWf3CBPdk5SD-nJ8dNXEPQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-08-01 17:51           ` Andrey Grodzovsky [this message]
2018-08-02  2:51           ` Zhou, David(ChunMing)
2018-08-02  6:01             ` Nayan Deshmukh
     [not found]               ` <CAFd4ddyf=EhJ7pmzq3sEGa6U1sQ7Ga7fUH+sW+VKeBxJABjnKQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-08-02  6:42                 ` zhoucm1
2018-08-01  9:35   ` [PATCH 1/4] drm/scheduler: add a list of run queues to the entity Christian König

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=6a065950-20c7-2c5a-9413-390d95126f07@amd.com \
    --to=andrey.grodzovsky-5c7gfcevmho@public.gmane.org \
    --cc=alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=christian.koenig-5C7GfCeVMHo@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=eric-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org \
    --cc=l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
    --cc=nayan26deshmukh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.