From: Jens Axboe <axboe@kernel.dk>
To: Hao Xu <haoxu.linux@icloud.com>, io-uring@vger.kernel.org
Cc: asml.silence@gmail.com, Dylan Yudaken <dylany@fb.com>
Subject: Re: [PATCH 3/3] io_uring: add support for ring mapped supplied buffers
Date: Wed, 18 May 2022 06:48:37 -0600 [thread overview]
Message-ID: <d36ea4ca-b2bb-511d-6440-a3e43f05e24d@kernel.dk> (raw)
In-Reply-To: <f1c6963f-9a53-db2c-3166-180800f14723@icloud.com>
On 5/18/22 4:50 AM, Hao Xu wrote:
>> This is known at compile time, so the compiler should already be doing
>> that as it's a constant.
>>
>>>> + buf = page_address(bl->buf_pages[index]);
>>>> + buf += off;
>>>> + }
>>>
>>> I'm not familiar with this part, allow me to ask, is this if else
>>> statement for efficiency? why choose one page as the dividing line
>>
>> We need to index at the right page granularity.
>
> Sorry, I didn't get it, why can't we just do buf = &br->bufs[tail];
> It seems something is beyond my knowledge..
The pages might not be contigious, we have to index from the right page.
--
Jens Axboe
next prev parent reply other threads:[~2022-05-18 12:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-16 16:21 [PATCHSET v6 0/3] Add support for ring mapped provided buffers Jens Axboe
2022-05-16 16:21 ` [PATCH 1/3] io_uring: add buffer selection support to IORING_OP_NOP Jens Axboe
2022-05-16 16:21 ` [PATCH 2/3] io_uring: add io_pin_pages() helper Jens Axboe
2022-05-16 16:21 ` [PATCH 3/3] io_uring: add support for ring mapped supplied buffers Jens Axboe
2022-05-17 14:18 ` Hao Xu
2022-05-17 15:46 ` Jens Axboe
2022-05-18 10:50 ` Hao Xu
2022-05-18 12:48 ` Jens Axboe [this message]
2022-05-17 14:20 ` [PATCHSET v6 0/3] Add support for ring mapped provided buffers Hao Xu
2022-05-17 15:44 ` Jens Axboe
-- strict thread matches above, loose matches on Subject: below --
2022-05-07 14:30 [PATCHSET v5 " Jens Axboe
2022-05-07 14:30 ` [PATCH 3/3] io_uring: add support for ring mapped supplied buffers Jens Axboe
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=d36ea4ca-b2bb-511d-6440-a3e43f05e24d@kernel.dk \
--to=axboe@kernel.dk \
--cc=asml.silence@gmail.com \
--cc=dylany@fb.com \
--cc=haoxu.linux@icloud.com \
--cc=io-uring@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.