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: <9ad5f93f-b566-03ec-dba4-1f7777489e29@linux.dev>
Date:   Thu, 29 Jun 2023 14:42:24 +0800
From:   Chengming Zhou <chengming.zhou@...ux.dev>
To:     Christoph Hellwig <hch@....de>
Cc:     axboe@...nel.dk, tj@...nel.org, linux-block@...r.kernel.org,
        linux-kernel@...r.kernel.org, zhouchengming@...edance.com,
        ming.lei@...hat.com
Subject: Re: [PATCH v3 3/3] blk-mq: fix start_time_ns and alloc_time_ns for
 pre-allocated rq

On 2023/6/29 13:32, Christoph Hellwig wrote:
>> +/* Set rq alloc and start time when pre-allocated rq is actually used */
>> +static inline void blk_mq_rq_time_init(struct request_queue *q, struct request *rq)
>> +{
>> +	if (blk_mq_need_time_stamp(rq->rq_flags)) {
>> +		u64 now = ktime_get_ns();
>> +
>> +#ifdef CONFIG_BLK_RQ_ALLOC_TIME
>> +		/*
>> +		 * alloc time is only used by iocost for now,
>> +		 * only possible when blk_mq_need_time_stamp().
>> +		 */
>> +		if (blk_queue_rq_alloc_time(q))
>> +			rq->alloc_time_ns = now;
>> +#endif
>> +		rq->start_time_ns = now;
>> +	}
>> +}
> 
> No need to pass q separately here, you can just use rq->q.
> 
> While you're at it please capitalize the first letter of block comments.
> 

Ok, I will use rq->q and fix the comments in the next version.

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ