From e96111476a669396167c56e911384c59bf69f4e4 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Tue, 16 May 2017 08:08:35 +1000 Subject: [PATCH] Skip updates if we're getting stacked low priority updates. --- src/stratifier.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/stratifier.c b/src/stratifier.c index 332615e6..77c5a79e 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -1413,6 +1413,12 @@ static void block_update(ckpool_t *ckp, int *prio) txntable_t *txns; workbase_t *wb; + /* Skip update if we're getting stacked low priority updates too close + * together. */ + if (*prio < GEN_PRIORITY && time(NULL) < sdata->update_time + (ckp->update_interval / 2)) { + ret = true; + goto out; + } retry: wb = generator_getbase(ckp); if (unlikely(!wb)) {