[PATCHv4] blk: Replace SG_GAPGS with new queue limits mask

Sagi Grimberg sagig at dev.mellanox.co.il
Thu Aug 6 10:36:58 PDT 2015


> +/*
> + * Check if adding a bio_vec after bprv with offset would create a gap in
> + * the SG list. Most drivers don't care about this, but some do.
> + */
> +static inline bool bvec_gap_to_prev(struct request_queue *q,
> +				struct bio_vec *bprv, unsigned int offset)
> +{
> +	if (!queue_virt_boundary(q))
> +		return false;
> +	return offset ||
> +		((bprv->bv_offset + bprv->bv_len) & queue_virt_boundary(q));

I'm wandering if it deserves an unlikely() statement given it really
depends on the application workload...

Thoughts?



More information about the Linux-nvme mailing list