Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Naman Jain <namjain@linux.microsoft.com>,
	Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>,
	Andrew Morton <akpm@linux-foundation.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Oscar Salvador <osalvador@suse.de>,
	Logan Gunthorpe <logang@deltatee.com>,
	Leon Romanovsky <leon@kernel.org>,
	Keith Busch <kbusch@kernel.org>,
	linux-block@vger.kernel.org, linux-mm@kvack.org,
	linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] iov_iter: Fix direct I/O across compatible device pgmaps
Date: Mon, 30 Nov 2026 11:57:07 +0100	[thread overview]
Message-ID: <69909d41-2221-41ef-9f49-915cd69f654b@kernel.org> (raw)
In-Reply-To: <20488a10-37a1-44a6-986d-e92dca87dd01@linux.microsoft.com>

On 11/30/26 05:44, Naman Jain wrote:
> 
> 
> On 11/29/2026 4:02 PM, David Hildenbrand (Arm) wrote:
>> On 11/27/26 05:05, Naman Jain wrote:
>>>
>>>
>>>
>>> IIUC, you want me to change this comment to kernel doc, something like this.
>>>
>>> /**
>>>    * zone_device_pages_compatible() - Check if pages can share a bio
>>>    * @a: First page
>>>    * @b: Second page
>>>    *
>>>    * Check if two pages from potentially different zone device pgmaps can
>>>    * coexist as separate bvec entries in the same bio.
>>>    *
>>>    * The block DMA iterator (blk_dma_map_iter_start()) caches the P2PDMA
>>>    * mapping state from the first segment and applies it to all subsequent
>>>    * segments, so P2PDMA pages from different pgmaps must not be mixed in
>>>    * the same bio.
>>>    *
>>>    * Other zone device types (FS_DAX, GENERIC) use the same dma_map_phys()
>>>    * path as normal RAM.  PRIVATE and COHERENT pages never appear in bios.
>>>    *
>>>    * Return: %true if the pages can coexist as separate bvec entries in the
>>>    * same bio, otherwise %false.
>>>    */
>>>
>>> I can do that in next version. Thanks.
>>
>>
>> Yeah, can we rename the function while moving it? in bio.h the "bio" context was
>> quite clear. In memremap.h it's a bit weird.
>>
>> If this is all about bios, I'd squeeze that into the filename and make it
>> clearer for *what* they are compatible.
>>
> 
> zone_device_pages_bio_compatible() is an alternative. Please let me know
> if this looks good.

Yeah, something like that is clearer.

-- 
Cheers,

David


      reply	other threads:[~2026-11-30 10:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-26  5:34 [PATCH] iov_iter: Fix direct I/O across compatible device pgmaps Naman Jain
2026-11-26 13:12 ` David Hildenbrand (Arm)
2026-11-27  4:05   ` Naman Jain
2026-11-29 10:32     ` David Hildenbrand (Arm)
2026-11-30  4:44       ` Naman Jain
2026-11-30 10:57         ` David Hildenbrand (Arm) [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=69909d41-2221-41ef-9f49-915cd69f654b@kernel.org \
    --to=david@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-cxl@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=logang@deltatee.com \
    --cc=namjain@linux.microsoft.com \
    --cc=osalvador@suse.de \
    --cc=stable@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox