Message ID | 1409662044-23337-2-git-send-email-petri.savolainen@linaro.org |
---|---|
State | New |
Headers | show |
If we wait with these patches, my new timer API and implementation is complete. Just going through the patch creation stage and fixing the miscellaneous complaints. On 2 September 2014 14:47, Petri Savolainen <petri.savolainen@linaro.org> wrote: > Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> > --- > example/timer/odp_timer_test.c | 16 +++++++++++----- > 1 file changed, 11 insertions(+), 5 deletions(-) > > diff --git a/example/timer/odp_timer_test.c > b/example/timer/odp_timer_test.c > index bf1d7df..f619665 100644 > --- a/example/timer/odp_timer_test.c > +++ b/example/timer/odp_timer_test.c > @@ -26,10 +26,10 @@ > #define MAX_WORKERS 32 /**< Max worker threads */ > #define MSG_POOL_SIZE (4*1024*1024) /**< Message pool size */ > > -/* Nanoseconds */ > -#define USEC 1000UL > -#define MSEC 1000000UL > -#define SEC 1000000000UL > +#define USEC ODP_TIME_USEC > +#define MSEC ODP_TIME_MSEC > +#define SEC ODP_TIME_SEC > + > > /** Test arguments */ > typedef struct { > @@ -195,7 +195,7 @@ static void parse_args(int argc, char *argv[], > test_args_t *args) > args->core_count = 0; /* all cores */ > args->resolution_us = 10000; > args->min_us = args->resolution_us; > - args->max_us = 100000000; > + args->max_us = 10000000; > args->period_us = 1000000; > args->tmo_count = 30; > > @@ -347,6 +347,12 @@ int main(int argc, char *argv[]) > args.min_us*USEC, > args.max_us*USEC); > > + if (test_timer == ODP_TIMER_INVALID) { > + ODP_ERR("Timer create failed.\n"); > + return -1; > + } > + > + > odp_shm_print_all(); > > printf("CPU freq %"PRIu64" hz\n", odp_sys_cpu_hz()); > -- > 2.1.0 > > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > http://lists.linaro.org/mailman/listinfo/lng-odp >
On 09/02/2014 05:31 PM, Ola Liljedahl wrote: > If we wait with these patches, my new timer API and implementation is > complete. Just going through the patch creation stage and fixing the > miscellaneous complaints. > Ola, if it's reasonable we can wait. Maxim. > > > On 2 September 2014 14:47, Petri Savolainen > <petri.savolainen@linaro.org <mailto:petri.savolainen@linaro.org>> wrote: > > Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org > <mailto:petri.savolainen@linaro.org>> > --- > example/timer/odp_timer_test.c | 16 +++++++++++----- > 1 file changed, 11 insertions(+), 5 deletions(-) > > diff --git a/example/timer/odp_timer_test.c > b/example/timer/odp_timer_test.c > index bf1d7df..f619665 100644 > --- a/example/timer/odp_timer_test.c > +++ b/example/timer/odp_timer_test.c > @@ -26,10 +26,10 @@ > #define MAX_WORKERS 32 /**< Max worker > threads */ > #define MSG_POOL_SIZE (4*1024*1024) /**< Message pool size */ > > -/* Nanoseconds */ > -#define USEC 1000UL > -#define MSEC 1000000UL > -#define SEC 1000000000UL > +#define USEC ODP_TIME_USEC > +#define MSEC ODP_TIME_MSEC > +#define SEC ODP_TIME_SEC > + > > /** Test arguments */ > typedef struct { > @@ -195,7 +195,7 @@ static void parse_args(int argc, char *argv[], > test_args_t *args) > args->core_count = 0; /* all cores */ > args->resolution_us = 10000; > args->min_us = args->resolution_us; > - args->max_us = 100000000; > + args->max_us = 10000000; > args->period_us = 1000000; > args->tmo_count = 30; > > @@ -347,6 +347,12 @@ int main(int argc, char *argv[]) > args.min_us*USEC, > args.max_us*USEC); > > + if (test_timer == ODP_TIMER_INVALID) { > + ODP_ERR("Timer create failed.\n"); > + return -1; > + } > + > + > odp_shm_print_all(); > > printf("CPU freq %"PRIu64" hz\n", odp_sys_cpu_hz()); > -- > 2.1.0 > > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org> > http://lists.linaro.org/mailman/listinfo/lng-odp > > > > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > http://lists.linaro.org/mailman/listinfo/lng-odp
> -----Original Message----- > From: lng-odp-bounces@lists.linaro.org [mailto:lng-odp- > bounces@lists.linaro.org] On Behalf Of ext Maxim Uvarov > Sent: Tuesday, September 02, 2014 5:12 PM > To: lng-odp@lists.linaro.org > Subject: Re: [lng-odp] [PATCH v2 2/2] Timer example error check > > On 09/02/2014 05:31 PM, Ola Liljedahl wrote: > > If we wait with these patches, my new timer API and implementation is > > complete. Just going through the patch creation stage and fixing the > > miscellaneous complaints. > > > Ola, if it's reasonable we can wait. > > Maxim. What's the benefit of not merging it while we are waiting for Ola? It's trivial improvement to the current implementation. -Petri
I agree. It's best to have a definitive version 1 and then have version 2 if version 1 is complete and available. No need for dangling patches. Bill On Tue, Sep 2, 2014 at 9:59 AM, Savolainen, Petri (NSN - FI/Espoo) < petri.savolainen@nsn.com> wrote: > > > > -----Original Message----- > > From: lng-odp-bounces@lists.linaro.org [mailto:lng-odp- > > bounces@lists.linaro.org] On Behalf Of ext Maxim Uvarov > > Sent: Tuesday, September 02, 2014 5:12 PM > > To: lng-odp@lists.linaro.org > > Subject: Re: [lng-odp] [PATCH v2 2/2] Timer example error check > > > > On 09/02/2014 05:31 PM, Ola Liljedahl wrote: > > > If we wait with these patches, my new timer API and implementation is > > > complete. Just going through the patch creation stage and fixing the > > > miscellaneous complaints. > > > > > Ola, if it's reasonable we can wait. > > > > Maxim. > > What's the benefit of not merging it while we are waiting for Ola? It's > trivial improvement to the current implementation. > > -Petri > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > http://lists.linaro.org/mailman/listinfo/lng-odp >
Version 2 has already arrived. Version 1 doesn't seem to reach completeness. On 2 September 2014 18:39, Bill Fischofer <bill.fischofer@linaro.org> wrote: > I agree. It's best to have a definitive version 1 and then have version 2 > if version 1 is complete and available. No need for dangling patches. > > Bill > > > On Tue, Sep 2, 2014 at 9:59 AM, Savolainen, Petri (NSN - FI/Espoo) < > petri.savolainen@nsn.com> wrote: > >> >> >> > -----Original Message----- >> > From: lng-odp-bounces@lists.linaro.org [mailto:lng-odp- >> > bounces@lists.linaro.org] On Behalf Of ext Maxim Uvarov >> > Sent: Tuesday, September 02, 2014 5:12 PM >> > To: lng-odp@lists.linaro.org >> > Subject: Re: [lng-odp] [PATCH v2 2/2] Timer example error check >> > >> > On 09/02/2014 05:31 PM, Ola Liljedahl wrote: >> > > If we wait with these patches, my new timer API and implementation is >> > > complete. Just going through the patch creation stage and fixing the >> > > miscellaneous complaints. >> > > >> > Ola, if it's reasonable we can wait. >> > >> > Maxim. >> >> What's the benefit of not merging it while we are waiting for Ola? It's >> trivial improvement to the current implementation. >> >> -Petri >> >> _______________________________________________ >> lng-odp mailing list >> lng-odp@lists.linaro.org >> http://lists.linaro.org/mailman/listinfo/lng-odp >> > > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > http://lists.linaro.org/mailman/listinfo/lng-odp > >
Your just too quick, Ola. :) On Tue, Sep 2, 2014 at 11:43 AM, Ola Liljedahl <ola.liljedahl@linaro.org> wrote: > Version 2 has already arrived. Version 1 doesn't seem to reach > completeness. > > > On 2 September 2014 18:39, Bill Fischofer <bill.fischofer@linaro.org> > wrote: > >> I agree. It's best to have a definitive version 1 and then have version >> 2 if version 1 is complete and available. No need for dangling patches. >> >> Bill >> >> >> On Tue, Sep 2, 2014 at 9:59 AM, Savolainen, Petri (NSN - FI/Espoo) < >> petri.savolainen@nsn.com> wrote: >> >>> >>> >>> > -----Original Message----- >>> > From: lng-odp-bounces@lists.linaro.org [mailto:lng-odp- >>> > bounces@lists.linaro.org] On Behalf Of ext Maxim Uvarov >>> > Sent: Tuesday, September 02, 2014 5:12 PM >>> > To: lng-odp@lists.linaro.org >>> > Subject: Re: [lng-odp] [PATCH v2 2/2] Timer example error check >>> > >>> > On 09/02/2014 05:31 PM, Ola Liljedahl wrote: >>> > > If we wait with these patches, my new timer API and implementation is >>> > > complete. Just going through the patch creation stage and fixing the >>> > > miscellaneous complaints. >>> > > >>> > Ola, if it's reasonable we can wait. >>> > >>> > Maxim. >>> >>> What's the benefit of not merging it while we are waiting for Ola? It's >>> trivial improvement to the current implementation. >>> >>> -Petri >>> >>> _______________________________________________ >>> lng-odp mailing list >>> lng-odp@lists.linaro.org >>> http://lists.linaro.org/mailman/listinfo/lng-odp >>> >> >> >> _______________________________________________ >> lng-odp mailing list >> lng-odp@lists.linaro.org >> http://lists.linaro.org/mailman/listinfo/lng-odp >> >> >
On 2014-09-02 15:47, Petri Savolainen wrote: > Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> > --- > example/timer/odp_timer_test.c | 16 +++++++++++----- > 1 file changed, 11 insertions(+), 5 deletions(-) > > diff --git a/example/timer/odp_timer_test.c b/example/timer/odp_timer_test.c > index bf1d7df..f619665 100644 > --- a/example/timer/odp_timer_test.c > +++ b/example/timer/odp_timer_test.c > @@ -26,10 +26,10 @@ > #define MAX_WORKERS 32 /**< Max worker threads */ > #define MSG_POOL_SIZE (4*1024*1024) /**< Message pool size */ > > -/* Nanoseconds */ > -#define USEC 1000UL > -#define MSEC 1000000UL > -#define SEC 1000000000UL > +#define USEC ODP_TIME_USEC > +#define MSEC ODP_TIME_MSEC > +#define SEC ODP_TIME_SEC No, why duplicate it? Cheers, Anders > + > > /** Test arguments */ > typedef struct { > @@ -195,7 +195,7 @@ static void parse_args(int argc, char *argv[], test_args_t *args) > args->core_count = 0; /* all cores */ > args->resolution_us = 10000; > args->min_us = args->resolution_us; > - args->max_us = 100000000; > + args->max_us = 10000000; > args->period_us = 1000000; > args->tmo_count = 30; > > @@ -347,6 +347,12 @@ int main(int argc, char *argv[]) > args.min_us*USEC, > args.max_us*USEC); > > + if (test_timer == ODP_TIMER_INVALID) { > + ODP_ERR("Timer create failed.\n"); > + return -1; > + } > + > + > odp_shm_print_all(); > > printf("CPU freq %"PRIu64" hz\n", odp_sys_cpu_hz()); > -- > 2.1.0 > > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > http://lists.linaro.org/mailman/listinfo/lng-odp
> -----Original Message----- > From: ext Anders Roxell [mailto:anders.roxell@linaro.org] > Sent: Tuesday, September 02, 2014 10:08 PM > To: Petri Savolainen > Cc: lng-odp@lists.linaro.org > Subject: Re: [lng-odp] [PATCH v2 2/2] Timer example error check > > On 2014-09-02 15:47, Petri Savolainen wrote: > > Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> > > --- > > example/timer/odp_timer_test.c | 16 +++++++++++----- > > 1 file changed, 11 insertions(+), 5 deletions(-) > > > > diff --git a/example/timer/odp_timer_test.c > b/example/timer/odp_timer_test.c > > index bf1d7df..f619665 100644 > > --- a/example/timer/odp_timer_test.c > > +++ b/example/timer/odp_timer_test.c > > @@ -26,10 +26,10 @@ > > #define MAX_WORKERS 32 /**< Max worker threads */ > > #define MSG_POOL_SIZE (4*1024*1024) /**< Message pool size */ > > > > -/* Nanoseconds */ > > -#define USEC 1000UL > > -#define MSEC 1000000UL > > -#define SEC 1000000000UL > > +#define USEC ODP_TIME_USEC > > +#define MSEC ODP_TIME_MSEC > > +#define SEC ODP_TIME_SEC > > No, why duplicate it? "args.min_us*USEC" is more readable than "args.min_us*ODP_TIME_USEC". -Petri > > Cheers, > Anders > > > + > > > > /** Test arguments */ > > typedef struct { > > @@ -195,7 +195,7 @@ static void parse_args(int argc, char *argv[], > test_args_t *args) > > args->core_count = 0; /* all cores */ > > args->resolution_us = 10000; > > args->min_us = args->resolution_us; > > - args->max_us = 100000000; > > + args->max_us = 10000000; > > args->period_us = 1000000; > > args->tmo_count = 30; > > > > @@ -347,6 +347,12 @@ int main(int argc, char *argv[]) > > args.min_us*USEC, > > args.max_us*USEC); > > > > + if (test_timer == ODP_TIMER_INVALID) { > > + ODP_ERR("Timer create failed.\n"); > > + return -1; > > + } > > + > > + > > odp_shm_print_all(); > > > > printf("CPU freq %"PRIu64" hz\n", odp_sys_cpu_hz()); > > -- > > 2.1.0 > > > > > > _______________________________________________ > > lng-odp mailing list > > lng-odp@lists.linaro.org > > http://lists.linaro.org/mailman/listinfo/lng-odp > > -- > Anders Roxell > anders.roxell@linaro.org > M: +46 709 71 42 85 | IRC: roxell
diff --git a/example/timer/odp_timer_test.c b/example/timer/odp_timer_test.c index bf1d7df..f619665 100644 --- a/example/timer/odp_timer_test.c +++ b/example/timer/odp_timer_test.c @@ -26,10 +26,10 @@ #define MAX_WORKERS 32 /**< Max worker threads */ #define MSG_POOL_SIZE (4*1024*1024) /**< Message pool size */ -/* Nanoseconds */ -#define USEC 1000UL -#define MSEC 1000000UL -#define SEC 1000000000UL +#define USEC ODP_TIME_USEC +#define MSEC ODP_TIME_MSEC +#define SEC ODP_TIME_SEC + /** Test arguments */ typedef struct { @@ -195,7 +195,7 @@ static void parse_args(int argc, char *argv[], test_args_t *args) args->core_count = 0; /* all cores */ args->resolution_us = 10000; args->min_us = args->resolution_us; - args->max_us = 100000000; + args->max_us = 10000000; args->period_us = 1000000; args->tmo_count = 30; @@ -347,6 +347,12 @@ int main(int argc, char *argv[]) args.min_us*USEC, args.max_us*USEC); + if (test_timer == ODP_TIMER_INVALID) { + ODP_ERR("Timer create failed.\n"); + return -1; + } + + odp_shm_print_all(); printf("CPU freq %"PRIu64" hz\n", odp_sys_cpu_hz());
Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> --- example/timer/odp_timer_test.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)