<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 19, 2018 at 10:17 PM, Cyril Hrubis <span dir="ltr"><<a href="mailto:chrubis@suse.cz" target="_blank">chrubis@suse.cz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">Hi!<br>
> It's about the time we should slowly prepare for the next release, as<br>
> usuall let's start with a list of patches that should go in before we<br>
> enter the stabilization phase.<br>
> <br>
> As for me I would like to get the two speedup patchsets in, one of them<br>
> only waits for ack from Jan, the second one would probably benefit from<br>
> some more review. I will try to merge everything that is good to go and<br>
> just waiting for a review ASAP.<br>
> <br>
> Anything else that should really go in?<br>
<br>
</span>Ping.<br>
<br>
I suppose that we should get in the fix for the read_all testcase along<br>
with the exponential back off.<br></blockquote><div><br><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">​I'm hesitating if we should abandon the old patch[1] and re-rewrite a new one<br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">(which base on the new TST_RETRY_FUNC macro) to fix the problem.<br><br>​[1]​ <a href="http://lists.linux.it/pipermail/ltp/2018-April/007704.html">http://lists.linux.it/pipermail/ltp/2018-April/007704.html</a><br><br>-----------------<br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">something new like:<br><br>--- a/testcases/kernel/fs/read_all/read_all.c<br>+++ b/testcases/kernel/fs/read_all/read_all.c<br>@@ -265,23 +265,14 @@ static void spawn_workers(void)<br> static void stop_workers(void)<br> {<br>        const char stop_code[1] = { '\0' };<br>-       int i, stop_attempts;<br>+       int i;<br> <br>        if (!workers)<br>                return;<br> <br>        for (i = 0; i < worker_count; i++) {<br>-               stop_attempts = 0xffff;<br>-               if (workers[i].q) {<br>-               if (workers[i].q) {<br>-                       while (!queue_push(workers[i].q, stop_code)) {<br>-                               if (--stop_attempts < 0) {<br>-                                       tst_brk(TBROK,<br>-                                               "Worker %d is stalled",<br>-                                               workers[i].pid);<br>-                                       break;<br>-                               }<br>-                       }<br>-               }<br>+               if (workers[i].q)<br>+                       TST_RETRY_FUNC(queue_push(workers[i].q, stop_code), 1);<br>        }<br> <br>        for (i = 0; i < worker_count; i++) {<br>@@ -292,33 +283,15 @@ static void stop_workers(void)<br>        }<br> }<br> <br>-static void sched_work(const char *path)<br>-{<br>-       static int cur;<br>-       int push_attempts = 0, pushed;<br>-<br>-       while (1) {<br>-               pushed = queue_push(workers[cur].q, path);<br>-<br>-               if (++cur >= worker_count)<br>-                       cur = 0;<br>-<br>-               if (pushed)<br>-                       break;<br>-<br>-               if (++push_attempts > worker_count) {<br>-                       usleep(100);<br>-                       push_attempts = 0;<br>-               }<br>-       }<br>-}<br>-<br> static void rep_sched_work(const char *path, int rep)<br> {<br>-       int i;<br>+       int i, j;<br> <br>-       for (i = 0; i < rep; i++)<br>-               sched_work(path);<br>+       for (i = j = 0; i < rep; i++, j++) {<br>+               if (j >= 15)<br>+                       j = 0;<br>+               TST_RETRY_FUNC(queue_push(workers[j].q, path), 1);<br>+       }<br> }<br> <br></div></div></div><br clear="all"><br>-- <br><div class="gmail_signature">Li Wang<br><a href="mailto:liwang@redhat.com" target="_blank">liwang@redhat.com</a></div>
</div></div>