mbox series

[0/6] Fuzzy Sync yielding and validation test

Message ID 20210305155123.18199-1-rpalethorpe@suse.com
Headers show
Series Fuzzy Sync yielding and validation test | expand

Message

Richard Palethorpe March 5, 2021, 3:51 p.m. UTC
Hello,

As suggested by Cyril, I have created a validation test so that we do
not have to reproduce a range of different kernel bugs for each change
to Fuzzy Sync.

Also I have built on Leo Yu-Chi Liang's patch to introduce yield. It
seemed to work mostly fine as it was. However I added some extra bits
to be safe (hopefully).

Leo Yu-Chi Liang (1):
  fzsync: Add sched_yield for single core machine

Richard Palethorpe (5):
  fzsync: Add self test
  fzsync: Reset delay bias
  fzsync: Correctly print positive lower delay range bound
  fzsync: Move yield check out of loop and add yield to delay
  fzsync: Check processor affinity

 include/tst_fuzzy_sync.h            | 119 +++++++++++---
 lib/newlib_tests/.gitignore         |   1 +
 lib/newlib_tests/test16.c           |   2 +
 lib/newlib_tests/tst_fuzzy_sync01.c | 233 ++++++++++++++++++++++++++++
 4 files changed, 331 insertions(+), 24 deletions(-)
 create mode 100644 lib/newlib_tests/tst_fuzzy_sync01.c

Comments

Petr Vorel March 9, 2021, 1:45 p.m. UTC | #1
Hi Richie,

1st patch has error:
tst_fuzzy_sync01.c: In function ‘delay’:
tst_fuzzy_sync01.c:107:10: error: ‘struct tst_fzsync_pair’ has no member named ‘yield_in_wait’
  107 |  if (pair.yield_in_wait)
      |          ^
tst_fuzzy_sync01.c:113:12: error: ‘struct tst_fzsync_pair’ has no member named ‘yield_in_wait’
  113 |    if (pair.yield_in_wait)
      |            ^
make[1]: *** [../../include/mk/rules.mk:37: tst_fuzzy_sync01] Error 1

4th patch (Leo Yu-Chi Liang's) patch has warnings:
In file included from tst_fuzzy_sync01.c:8:
../../include/tst_fuzzy_sync.h: In function ‘tst_fzsync_pair_init’:
../../include/tst_fuzzy_sync.h:199:18: warning: comparison of constant ‘0’ with boolean expression is always false [-Wbool-compare]
  199 |  if (pair->param < low)            \
      |                  ^
../../include/tst_fuzzy_sync.h:221:2: note: in expansion of macro ‘CHK’
  221 |  CHK(yield_in_wait, 0, 1, (tst_ncpus() <= 1));
      |  ^~~
../../include/tst_fuzzy_sync.h:201:18: warning: comparison of constant ‘1’ with boolean expression is always false [-Wbool-compare]
  201 |  if (pair->param > hi)            \
      |                  ^
../../include/tst_fuzzy_sync.h:221:2: note: in expansion of macro ‘CHK’
  221 |  CHK(yield_in_wait, 0, 1, (tst_ncpus() <= 1));


Apart from that whole patchset LGTM, agree with Cyril's suggestions.

Kind regards,
Petr