Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When will fileRegion be supported? #210

Open
weitingyuk opened this issue Aug 17, 2023 · 15 comments
Open

When will fileRegion be supported? #210

weitingyuk opened this issue Aug 17, 2023 · 15 comments

Comments

@weitingyuk
Copy link

The io_uring transport does not currently support fileRegion, when will fileRegion be supported? We are eager to try iouringFileRegion.

@weitingyuk
Copy link
Author

@1Jo1 Cloud you mind help to see this issue?

@normanmaurer
Copy link
Member

Seems like while sendfile is not directly supported by io_uring itself it is possible to kind of create the same functionality by using splice: https://lwn.net/Articles/810482/

@weitingyuk
Copy link
Author

@normanmaurer I don't know much about the Linux kernel. Will netty io_uring consider using splice to implement fileRegion?

@weitingyuk
Copy link
Author

I'm not sure there is some gap for netty io_uring to implement fileRegion by using splice.

@normanmaurer
Copy link
Member

Yes .... I just left the comment for the future so I dont forget. I am currently busy but might implement it once I have some cycles.

@weitingyuk
Copy link
Author

We really want to try the file region in netty io_uring. If there is no plan for this currently, we can only abandon this plan, thanks very much.

@normanmaurer
Copy link
Member

If someone implements it I am happy to review the code... I dont have the cycles atm to do it myself

@dreamlike-ocean
Copy link

dreamlike-ocean commented Oct 24, 2024

Hello,Can we have an IoUringChunkedNioFile? I tried it and it doesn't seem difficult.

https://github.com/dreamlike-ocean/netty/blob/feature-asyncfile/transport-classes-io_uring/src/main/java/io/netty/channel/uring/IoUringAsyncFile.java

@franz1981
Copy link
Contributor

hi @dreamlike-ocean I think this one to be a better fit outside Netty, which is just a "network" framework.
FileRegion is not indeed a good term because in Netty it implies zero-copy semantic, which is not happening here; I believe that having such async file abstraction in vertx, for example, to be super cool @vietj wdyt?

@normanmaurer
Copy link
Member

@franz1981 actually FileRegion should do a zero copy (aka sendfile). We just never did it so far... It should be doable as io_uring supports splice.

@dreamlike-ocean
Copy link

dreamlike-ocean commented Oct 24, 2024

@franz1981 actually FileRegion should do a zero copy (aka sendfile). We just never did it so far... It should be doable as io_uring supports splice.

yes ,I tried it and it doesn't seem difficult.。
https://github.com/dreamlike-ocean/PanamaUring/blob/master/panama-uring/src/main/java/top/dreamlike/panama/uring/async/fd/AsyncSplicer.java

@franz1981
Copy link
Contributor

+1 for the splice-version because it is more in line of what we currently offer with FileRegion
@normanmaurer wdyt if @dreamlike-ocean send a PR? :)

@dreamlike-ocean
Copy link

+1 for the splice-version because it is more in line of what we currently offer with FileRegion @normanmaurer wdyt if @dreamlike-ocean send a PR? :)

I will try it later

@normanmaurer
Copy link
Member

Sure we love PRs

@dreamlike-ocean
Copy link

dreamlike-ocean commented Oct 30, 2024

Sure we love PRs

Hi! I have submitted a pull request for this requirement. Please review it.Check if I have correctly understood this requirement.
netty/netty#14424

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants