aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2021-06-08 09:16:13 +0200
committerDmitry Vyukov <dvyukov@google.com>2021-06-08 09:49:11 +0200
commite5e7d9aa2a347f1ee43d0959364993a327967f1b (patch)
tree115c07b5a96e23af2a91b0aaf8219f4c615127fb
parentb718257f456d456345e1129b27a9340c91c18f3b (diff)
syz-ci: poll commits more regularly
-rw-r--r--syz-ci/jobs.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/syz-ci/jobs.go b/syz-ci/jobs.go
index 37e0b6e72..a552f31f9 100644
--- a/syz-ci/jobs.go
+++ b/syz-ci/jobs.go
@@ -60,12 +60,19 @@ func (jp *JobProcessor) loop() {
loop:
for {
// Check jp.stop separately first, otherwise if stop signal arrives during a job execution,
- // we can grab the next one with 50% probability.
+ // we can still grab the next job with 50% probability.
select {
case <-jp.stop:
break loop
default:
}
+ // Similar for commit polling: if we grab 2-3 bisect jobs in a row,
+ // it can delay commit polling by days.
+ select {
+ case <-commitTicker.C:
+ jp.pollCommits()
+ default:
+ }
select {
case <-jobTicker.C:
if len(kernelBuildSem) != 0 {