Re: [PATCH] blk-mq: modify hybrid sleep time to aggressive

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

 



Adding Damien who wrote this code.

On Wed, Nov 18, 2020 at 09:47:46AM +0900, Dongjoo Seo wrote:
> Current sleep time for hybrid polling is half of mean time.
> The 'half' sleep time is good for minimizing the cpu utilization.
> But, the problem is that its cpu utilization is still high.
> this patch can help to minimize the cpu utilization side.
> 
> Below 1,2 is my test hardware sets.
> 
> 1. Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz + Samsung 970 pro 1Tb
> 2. Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz + INTEL SSDPED1D480GA 480G
> 
>         |  Classic Polling | Hybrid Polling  | this Patch
> -----------------------------------------------------------------
>         cpu util | IOPS(k) | cpu util | IOPS | cpu util | IOPS  |
> -----------------------------------------------------------------
> 1.       99.96   |   491   |  56.98   | 467  | 35.98    | 442   |
> -----------------------------------------------------------------
> 2.       99.94   |   582   |  56.3    | 582  | 35.28    | 582   |
> 
> cpu util means that sum of sys and user util.
> 
> I used 4k rand read for this test.
> because that case is worst case of I/O performance side.
> below one is my fio setup.
> 
> name=pollTest
> ioengine=pvsync2
> hipri
> direct=1
> size=100%
> randrepeat=0
> time_based
> ramp_time=0
> norandommap
> refill_buffers
> log_avg_msec=1000
> log_max_value=1
> group_reporting
> filename=/dev/nvme0n1
> [rd_rnd_qd_1_4k_1w]
> bs=4k
> iodepth=32
> numjobs=[num of cpus]
> rw=randread
> runtime=60
> write_bw_log=bw_rd_rnd_qd_1_4k_1w
> write_iops_log=iops_rd_rnd_qd_1_4k_1w
> write_lat_log=lat_rd_rnd_qd_1_4k_1w
> 
> Thanks
> 
> Signed-off-by: Dongjoo Seo <commisori28@xxxxxxxxx>
> ---
>  block/blk-mq.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/block/blk-mq.c b/block/blk-mq.c
> index 1b25ec2fe9be..c3d578416899 100644
> --- a/block/blk-mq.c
> +++ b/block/blk-mq.c
> @@ -3749,8 +3749,7 @@ static unsigned long blk_mq_poll_nsecs(struct request_queue *q,
>  		return ret;
>  
>  	if (q->poll_stat[bucket].nr_samples)
> -		ret = (q->poll_stat[bucket].mean + 1) / 2;
> -
> +		ret = (q->poll_stat[bucket].mean + 1) * 3 / 4;
>  	return ret;
>  }
>  
> -- 
> 2.17.1
> 
---end quoted text---



[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