Re: [PATCH V3 3/3] blk-mq: dequeue request one by one from sw queue iff hctx is busy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> +/*
> + * 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.



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux