lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CO1PR10MB4563B1B650C89FA32B60AE1298D7A@CO1PR10MB4563.namprd10.prod.outlook.com>
Date:   Mon, 16 Oct 2023 20:01:22 +0000
From:   Gulam Mohamed <gulam.mohamed@...cle.com>
To:     Bart Van Assche <bvanassche@....org>,
        "axboe@...nel.dk" <axboe@...nel.dk>,
        "linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH V2] Consider inflight IO in io accounting for high latency
 devices

Hi Bart,

   Thanks for your review. Can you please see my inline comments?

Regards,
Gulam Mohamed.

-----Original Message-----
From: Bart Van Assche <bvanassche@....org> 
Sent: Saturday, October 14, 2023 2:43 AM
To: Gulam Mohamed <gulam.mohamed@...cle.com>; axboe@...nel.dk; linux-block@...r.kernel.org; linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2] Consider inflight IO in io accounting for high latency devices

On 10/13/23 12:55, Gulam Mohamed wrote:
> @@ -1015,7 +1018,13 @@ static inline void blk_account_io_start(struct request *req)
>   			req->part = req->q->disk->part0;
>   
>   		part_stat_lock();
> -		update_io_ticks(req->part, jiffies, false);
> +
> +		if (req->q->nr_hw_queues == 1) {
> +			hctx = xa_load(&req->q->hctx_table, 0);
> +			inflight = blk_mq_hctx_has_tags(hctx);
> +		}
> +
> +		update_io_ticks(req->part, jiffies, inflight);
>   		part_stat_unlock();
>   	}
>   }

blk_account_io_start() is called by blk_mq_bio_to_request(). So if I/O statistics are enabled and if there is only a single hardware queue,
blk_mq_hctx_has_tags() will be called every time a bio is submitted?
The blk_mq_hctx_has_tags() function iterates over all tags. I would be surprised if anyone would consider the overhead of this approach acceptable.

[GULAM]: Yes, it will be called for every submitted bio but for the high latency devices it will not have much impact. This is indicated by the latency figures I provided in the review mail, with and without our patch.

Thanks,

Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ