Re: [PATCH 5/9] block: add support for blk_mq_end_request_batch()

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

 



> +void blk_mq_end_request_batch(struct io_batch *iob)
> +{
> +	int tags[TAG_COMP_BATCH], nr_tags = 0, acct_tags = 0;
> +	struct blk_mq_hw_ctx *last_hctx = NULL;
> +	struct request *rq;
> +	u64 now = 0;
> +
> +	while ((rq = rq_list_pop(&iob->req_list)) != NULL) {
> +		if (!now && blk_mq_need_time_stamp(rq))
> +			now = ktime_get_ns();
> +		blk_update_request(rq, rq->status, blk_rq_bytes(rq));
> +		__blk_mq_end_request_acct(rq, rq->status, now);
> +
> +		if (rq->q->elevator) {
> +			blk_mq_free_request(rq);
> +			continue;
> +		}

So why do we even bother adding requests with an elevator to the batch
list?  

> +	/*
> +	 * csd is used for remote completions, fifo_time at scheduler time.
> +	 * They are mutually exclusive. result is used at completion time
> +	 * like csd, but for batched IO. Batched IO does not use IPI
> +	 * completions.
> +	 */
>  	union {
>  		struct __call_single_data csd;
>  		u64 fifo_time;
> +		blk_status_t status;
>  	};

The ->status field isn't needed any more now that error completions
aren't batched.



[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