> -----Original Message-----
> From: Trahe, Fiona <fiona.tr...@intel.com>
> Sent: Tuesday, July 16, 2019 7:20 PM
> To: Trybula, ArturX <arturx.tryb...@intel.com>; Shally Verma
> <shal...@marvell.com>; dev@dpdk.org; Dybkowski, AdamX
> <adamx.dybkow...@intel.com>; akhil.go...@nxp.com
> Cc: Trahe, Fiona <fiona.tr...@intel.com>
> Subject: RE: [EXT] [PATCH v4 1/1] app/test-compress-perf: report header
> improvement
> 
....

> >
> > > -----Original Message-----
> > > From: Artur Trybula <arturx.tryb...@intel.com>
> > > Sent: Friday, July 12, 2019 4:13 PM
> > > To: dev@dpdk.org; fiona.tr...@intel.com; Shally Verma
> > > <shal...@marvell.com>; adamx.dybkow...@intel.com;
> > > arturx.tryb...@intel.com; akhil.go...@nxp.com
> > > Subject: [EXT] [PATCH v4 1/1] app/test-compress-perf: report header
> > > improvement
> > >
> > > External Email
> > >
> > > --------------------------------------------------------------------
> > > -- This patch adds extra features to the compress performance test.
> > > Some important parameters (memory allocation, number of ops, number
> > > of
> > > segments) are calculated and printed out on the screen.
> > > Information about compression threads is also provided.
> > >
> > > Signed-off-by: Artur Trybula <arturx.tryb...@intel.com>
> > > ---
> > >  .../comp_perf_test_benchmark.c                | 21 ++++-
> > >  .../comp_perf_test_common.c                   | 94 ++++++++++++++++++-
> > >  .../comp_perf_test_common.h                   |  6 ++
> > >  app/test-compress-perf/main.c                 |  4 +-
> > >  4 files changed, 120 insertions(+), 5 deletions(-)
> > >
> > > diff --git a/app/test-compress-perf/comp_perf_test_benchmark.c
> > > b/app/test-compress-perf/comp_perf_test_benchmark.c
> > > index aa1f8eea2..887459449 100644
> > > --- a/app/test-compress-perf/comp_perf_test_benchmark.c
> > > +++ b/app/test-compress-perf/comp_perf_test_benchmark.c
> > > @@ -329,9 +329,26 @@ cperf_benchmark_test_runner(void *test_ctx)
> > >   struct comp_test_data *test_data = ctx->ver.options;
> > >   uint32_t lcore = rte_lcore_id();
> > >   static rte_atomic16_t display_once = RTE_ATOMIC16_INIT(0);
> > > + int i, ret = EXIT_SUCCESS;
> > >
> > >   ctx->ver.mem.lcore_id = lcore;
> > > - int i, ret = EXIT_SUCCESS;
> > > +
> > > + /*
> > > +  * printing information about current compression thread
> > > +  */
> > > + if (rte_atomic16_test_and_set(&ctx->ver.mem.print_info_once))
> > Question: runner() will be executed by each core so is ctx is thread
> > local variable or global.? If it can be made thread local, then there would 
> > be
> no need of atomic here?
> > [Artur] Runners are restarted for each compression level. It's enough
> > to have the data printed only once.
> [Fiona] added clarification - we originally did as you suggest, but in cases
> where there are multiple params, e.g. level 1-9, the thread is
> started/stopped for each level, so the header was printing out many times -
> always with the same data. So we needed the atomic to resolve.
> 
[Shally] Okay. 

> >
....

> > > diff --git a/app/test-compress-perf/comp_perf_test_common.c
> > > b/app/test- compress-perf/comp_perf_test_common.c
> > > index 472c76686..3dc9349b0 100644
> > > --- a/app/test-compress-perf/comp_perf_test_common.c
> > > +++ b/app/test-compress-perf/comp_perf_test_common.c
> > > @@ -16,6 +16,18 @@
> > >
> > >  #define DIV_CEIL(a, b)  ((a) / (b) + ((a) % (b) != 0))
> > >
> > > +struct performance_tests_results {
> > > + uint16_t total_segments;
> > > + uint16_t segment_sz;
> > > + uint16_t last_segment_sz;
> > > + uint32_t total_buffs;         /*number of buffers = number of ops*/
> > > + uint16_t segments_per_buff;
> > > + uint16_t segments_per_last_buff;
> > > + size_t input_data_sz;
> > > +};
> > These looks more like test configuration than result. If you agree, then can
> rename it to test_config ..
> > [Artur] These are exactly tests results, internal variables used by the
> algorithm. A kind of snapshot.
> > Config by definition is used for configuration. In this case all the fields 
> > are
> only printed out.
> [Fiona] I can see the confusion, it's not the input config - but it's also
> confusing to call it results, as that implies the throughput and ratio 
> numbers.
> How about cperf_buffer_info?
[Shally] this sound better.

> >
...

> > > + if (tests_res.segments_per_last_buff > 1) {
> > > +         printf("        • 1 op %u segments:\n",
> > > +                         tests_res.segments_per_last_buff);
> > > +         printf("                o %u segment size %u\n",
> > > +                 tests_res.segments_per_last_buff - 1,
> > > +                 tests_res.segment_sz);
> > > +         printf("                o last segment size %u\n",
> > > +                 tests_res.last_segment_sz);
> > > + } else if (tests_res.segments_per_last_buff == 1) {
> > > +         printf("        • 1 op (the last one): %u segment %u"
> > > +                         " byte(s) long\n\n",
> > > +                 tests_res.segments_per_last_buff,
> > > +                 tests_res.last_segment_sz);
> > > + }
> > Probably this if and else if here can be replaced by just 1 statement.
> > [Artur] I think it's ok. This version is clear. If you like I can remove {}
> brackets from the "else if".
> [Fiona] I think it's ok as is - there are different output whether >1 or ==1, 
> so
> better to leave as separate paths.
[Shally] Okay. That was just my 2 cents. Am fine it "as is".

> >
..
> > > 2.17.1

Reply via email to