Re: [PATCH v1 05/15] io_uring: mark pages in ifq region with zctap information.

Jonathan Lemon
2022-11-17T20:49:00Z

On 16 Nov 2022, at 0:12, Christoph Hellwig wrote:

> On Mon, Nov 07, 2022 at 09:05:11PM -0800, Jonathan Lemon wrote:
>> The network stack passes up pages, which must be mapped to
>> zctap device buffers in order to get the reference count and
>> other items. Mark the page as private, and use the page_private
>> field to record the lookup and ownership information.
>
> Who coordinate ownership of page_private here? What other parts
> of the kernel could touch these pages?

This may be an issue. The driver, network stack, and application
all utilize the pages, which have been pinned by io_uring. If the
pages are passed to another subsystem which wants to use the private
area for its own purposes, there will be a conflict.

There doesn’t seem to be a good way to maintain long term information
in the current page structure. A resolution for this would be using
an external lookup indexed by the page, or changing the information
passed up in the skb.
—
Jonathan