[PATCH 1/9] block: don't merge different kinds of P2P transfers in a single bio

Kanchan Joshi joshi.k at samsung.com
Wed Jun 11 23:24:21 PDT 2025


On 6/10/2025 10:36 AM, Christoph Hellwig wrote:
> --- a/block/bio.c
> +++ b/block/bio.c
> @@ -930,8 +930,6 @@ static bool bvec_try_merge_page(struct bio_vec *bv, struct page *page,
>   		return false;
>   	if (xen_domain() && !xen_biovec_phys_mergeable(bv, page))
>   		return false;
> -	if (!zone_device_pages_have_same_pgmap(bv->bv_page, page))
> -		return false;

I did not understand the value of moving this out to its two callers 
(bio_add_page and bio_integrity_add_page).

Since this check existed, I am a bit confused. The thing that patch 
title says - is not a new addition and used to happen earlier too?
Or is this about setting REQ_NOMERGE in bio?

Flagging P2P bio with the new flag REQ_P2PDMA seems preparatory work to 
optimize stuff in subsequent patches.



More information about the Linux-nvme mailing list