diff mbox

linux-generic: schedule: set sched_local.pool correctly

Message ID 1448975663-23653-1-git-send-email-bill.fischofer@linaro.org
State Accepted
Commit 7afa127e124b298dad557f192e02468cd9bcc5cc
Headers show

Commit Message

Bill Fischofer Dec. 1, 2015, 1:14 p.m. UTC
This corrects bug https://bugs.linaro.org/show_bug.cgi?id=1921

Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
---
 platform/linux-generic/odp_schedule.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Bill Fischofer Dec. 1, 2015, 2:05 p.m. UTC | #1
At least in the linux-generic implementation, we force max_deq to be 1
since we want consecutive events from an ordered queue to be dispatched to
separate threads.  There's no advantage to batching things as is done in
parallel queues since if Thread A has events 1, 2,3, 4 while Thread B has
events 5, etc., then Thread B's processing of event 5 would just have to
wait until Thread A worked its way though it's backlog of cached events.

So this isn't an issue here.

On Tue, Dec 1, 2015 at 7:39 AM, Nicolas Morey-Chaisemartin <nmorey@kalray.eu
> wrote:


> I don't think there is any guarantee that all buffer returned by

> queue_deq_multi come from the same pool.

> So this should probably be updated when we copy an event out of the local

> cache at the beginning of schedule()

>

> Nicolas

>

> On 12/01/2015 02:14 PM, Bill Fischofer wrote:

> > This corrects bug https://bugs.linaro.org/show_bug.cgi?id=1921

> >

> > Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>

> > ---

> >  platform/linux-generic/odp_schedule.c | 2 ++

> >  1 file changed, 2 insertions(+)

> >

> > diff --git a/platform/linux-generic/odp_schedule.c

> b/platform/linux-generic/odp_schedule.c

> > index 884ae60..9b7cd57 100644

> > --- a/platform/linux-generic/odp_schedule.c

> > +++ b/platform/linux-generic/odp_schedule.c

> > @@ -553,6 +553,8 @@ static int schedule(odp_queue_t *out_queue,

> odp_event_t out_ev[],

> >                               sched_local.origin_qe = qe;

> >                               sched_local.order =

> >                                       sched_local.buf_hdr[0]->order;

> > +                             sched_local.pool =

> > +                                     sched_local.buf_hdr[0]->pool_hdl;

> >                               for (k = 0;

> >                                    k < qe->s.param.sched.lock_count;

> >                                    k++) {

>

>
Bill Fischofer Dec. 10, 2015, 7:58 p.m. UTC | #2
Ping

On Tue, Dec 1, 2015 at 7:14 AM, Bill Fischofer <bill.fischofer@linaro.org>
wrote:

> This corrects bug https://bugs.linaro.org/show_bug.cgi?id=1921

>

> Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>

> ---

>  platform/linux-generic/odp_schedule.c | 2 ++

>  1 file changed, 2 insertions(+)

>

> diff --git a/platform/linux-generic/odp_schedule.c

> b/platform/linux-generic/odp_schedule.c

> index 884ae60..9b7cd57 100644

> --- a/platform/linux-generic/odp_schedule.c

> +++ b/platform/linux-generic/odp_schedule.c

> @@ -553,6 +553,8 @@ static int schedule(odp_queue_t *out_queue,

> odp_event_t out_ev[],

>                                 sched_local.origin_qe = qe;

>                                 sched_local.order =

>                                         sched_local.buf_hdr[0]->order;

> +                               sched_local.pool =

> +                                       sched_local.buf_hdr[0]->pool_hdl;

>                                 for (k = 0;

>                                      k < qe->s.param.sched.lock_count;

>                                      k++) {

> --

> 2.1.4

>

>
Maxim Uvarov Dec. 11, 2015, 7:22 a.m. UTC | #3
Merged,
Maxim.

On 12/10/2015 22:58, Bill Fischofer wrote:
> Ping
>
> On Tue, Dec 1, 2015 at 7:14 AM, Bill Fischofer 
> <bill.fischofer@linaro.org <mailto:bill.fischofer@linaro.org>> wrote:
>
>     This corrects bug https://bugs.linaro.org/show_bug.cgi?id=1921
>
>     Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org
>     <mailto:bill.fischofer@linaro.org>>
>     ---
>      platform/linux-generic/odp_schedule.c | 2 ++
>      1 file changed, 2 insertions(+)
>
>     diff --git a/platform/linux-generic/odp_schedule.c
>     b/platform/linux-generic/odp_schedule.c
>     index 884ae60..9b7cd57 100644
>     --- a/platform/linux-generic/odp_schedule.c
>     +++ b/platform/linux-generic/odp_schedule.c
>     @@ -553,6 +553,8 @@ static int schedule(odp_queue_t *out_queue,
>     odp_event_t out_ev[],
>                                     sched_local.origin_qe = qe;
>                                     sched_local.order =
>     sched_local.buf_hdr[0]->order;
>     +                               sched_local.pool =
>     +  sched_local.buf_hdr[0]->pool_hdl;
>                                     for (k = 0;
>                                          k < qe->s.param.sched.lock_count;
>                                          k++) {
>     --
>     2.1.4
>
>
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
diff mbox

Patch

diff --git a/platform/linux-generic/odp_schedule.c b/platform/linux-generic/odp_schedule.c
index 884ae60..9b7cd57 100644
--- a/platform/linux-generic/odp_schedule.c
+++ b/platform/linux-generic/odp_schedule.c
@@ -553,6 +553,8 @@  static int schedule(odp_queue_t *out_queue, odp_event_t out_ev[],
 				sched_local.origin_qe = qe;
 				sched_local.order =
 					sched_local.buf_hdr[0]->order;
+				sched_local.pool =
+					sched_local.buf_hdr[0]->pool_hdl;
 				for (k = 0;
 				     k < qe->s.param.sched.lock_count;
 				     k++) {