RE: [PATCH] [v3] blk-mq: add cond_resched() in __blk_mq_alloc_rq_maps()

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

 



Thank you Bart Van
Hi Jens,
Whether this version patch is ok for you?
Looking forward to your further comments :)

-----Original Message-----
From: Bart Van Assche [mailto:bvanassche@xxxxxxx] 
Sent: Saturday, September 26, 2020 12:07 PM
To: tianxianting (RD) <tian.xianting@xxxxxxx>; axboe@xxxxxxxxx
Cc: linux-block@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH] [v3] blk-mq: add cond_resched() in __blk_mq_alloc_rq_maps()

On 2020-09-25 19:39, Xianting Tian wrote:
> diff --git a/block/blk-mq.c b/block/blk-mq.c index 
> b3d2785ee..62d152d03 100644
> --- a/block/blk-mq.c
> +++ b/block/blk-mq.c
> @@ -3256,9 +3256,11 @@ static int __blk_mq_alloc_rq_maps(struct 
> blk_mq_tag_set *set)  {
>  	int i;
>  
> -	for (i = 0; i < set->nr_hw_queues; i++)
> +	for (i = 0; i < set->nr_hw_queues; i++) {
>  		if (!__blk_mq_alloc_map_and_request(set, i))
>  			goto out_unwind;
> +		cond_resched();
> +	}
>  
>  	return 0;

Reviewed-by: Bart Van Assche <bvanassche@xxxxxxx>




[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