Re: [PATCH 8/9] block/mq-deadline: Add I/O priority support

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

 



On 5/26/21 8:48 PM, Damien Le Moal wrote:
> On 2021/05/27 10:02, Bart Van Assche wrote:
>> +	if (next->elv.priv[0]) {
>> +		atomic_inc(&dd->merged[prio]);
>> +	} else {
>> +		WARN_ON_ONCE(true);
>> +	}
> 
> I do not think you need the curly braces here.

These are present because patch 9/9 adds more code in this if-statement
and to improve readability of patch 9/9.

>> @@ -392,9 +453,14 @@ static struct request *dd_dispatch_request(struct blk_mq_hw_ctx *hctx)
>>  {
>>  	struct deadline_data *dd = hctx->queue->elevator->elevator_data;
>>  	struct request *rq;
>> +	enum dd_prio prio;
>>  
>>  	spin_lock(&dd->lock);
>> -	rq = __dd_dispatch_request(dd);
>> +	for (prio = 0; prio <= DD_PRIO_MAX; prio++) {
>> +		rq = __dd_dispatch_request(dd, prio);
>> +		if (rq || dd_queued(dd, prio))
>> +			break;
>> +	}
>>  	spin_unlock(&dd->lock);
> 
> Unless I missed something, this means that the aging (fifo list expire)
> mechanism is per prio list but there is no aging between the prio classes. This
> means that an application doing lots of RT direct IOs will completely starve
> other prio classes and hang the applications using them.
> 
> I think we need aging between the prio classes too to avoid that.

OK, I will add an aging mechanism.

Bart.



[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