diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2019-06-03 13:12:44 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-06-03 13:13:56 +0200 |
| commit | 2fa06225add0fb4c40f00a6ea2a5b495cc209ced (patch) | |
| tree | a6ced98a43e434600ef526ca0013691136454ee3 | |
| parent | 5368a448e4cc1784723ad9af407247e66aa026b9 (diff) | |
syz-manager: increase initial poll batch size
When the fuzzer starts, it pumps the whole corpus.
If we do it using the final batchSize, it can be very slow
batch of size 6 can take more than 10 mins for 50K corpus and slow kernel).
Use a batch of 30 initially.
| -rw-r--r-- | syz-manager/rpc.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/syz-manager/rpc.go b/syz-manager/rpc.go index ed7a78112..e4875c20f 100644 --- a/syz-manager/rpc.go +++ b/syz-manager/rpc.go @@ -159,7 +159,16 @@ func (serv *RPCServer) Poll(a *rpctype.PollArgs, r *rpctype.PollRes) error { r.Candidates = serv.mgr.candidateBatch(serv.batchSize) } if len(r.Candidates) == 0 { - for i := 0; i < serv.batchSize && len(f.inputs) > 0; i++ { + batchSize := serv.batchSize + // When the fuzzer starts, it pumps the whole corpus. + // If we do it using the final batchSize, it can be very slow + // (batch of size 6 can take more than 10 mins for 50K corpus and slow kernel). + // So use a larger batch initially (we use no stats as approximation of initial pump). + const initialBatch = 30 + if len(a.Stats) == 0 && batchSize < initialBatch { + batchSize = initialBatch + } + for i := 0; i < batchSize && len(f.inputs) > 0; i++ { last := len(f.inputs) - 1 r.NewInputs = append(r.NewInputs, f.inputs[last]) f.inputs[last] = rpctype.RPCInput{} |
