Re: [PATCH V3 3/3] blk-mq: dequeue request one by one from sw queue iff hctx is busy From: Christoph Hellwig <hch@lst.de> Date: 2018-07-02 13:17:38 +/* + * Update dispatch busy with EWMA: Please expand the EWMA acronym. +static void blk_mq_update_hctx_busy(struct blk_mq_hw_ctx *hctx, bool busy) +{ + const unsigned weight = 8; + unsigned int ewma; + + if (hctx->queue->elevator) + return; + + ewma = READ_ONCE(hctx->dispatch_busy); + + ewma *= weight - 1; + if (busy) + ewma += 16; plese use descriptive all upper case #defines for the WEIGHT and FACTOR so that they stick out.
Keyboard shortcuts hback out one level jnext message in thread kprevious message in thread ldrill in Escclose help / fold thread tree ?toggle this help