|
Jens Axboe
@
axboe
Park City, Utah
|
|
Linux kernel IO dabbler @ Facebook
|
|
|
1,287
Tweets
|
283
Following
|
2,319
Followers
|
| Tweets |
|
Jens Axboe
@axboe
|
Feb 1 |
|
If you mean a generic thread pool, then the story is a bit sad on Linux, unfortunately. There is no good generic one like other operating systems have. io_uring just solves the case for thread pools for system calls, not generic work items.
|
||
|
|
||
|
Jens Axboe
@axboe
|
Feb 1 |
|
That story is developing, there's someone looking into cgroup support for io_uring. Nothing there yet, but will get done sooner rather than later.
|
||
|
|
||
|
Jens Axboe
@axboe
|
Feb 1 |
|
It's application coordinated: setup one ring, pass in the ring fd to the next one and ask to attach as part of setup. The hard part is in the backend sharing, it'd be trivial to handle the "what to attach to" part differently. I suspect best done through the pending cgroups work.
|
||
|
|
||
|
Jens Axboe
@axboe
|
Feb 1 |
|
I actually added support recently for just that, allowing you to have multiple io_uring instances sharing a single thread pool backend.
|
||
|
|
||
|
Jens Axboe
@axboe
|
Jan 31 |
|
That already works into the pipe, but you can't gift these to the application with a SPLICE_F_MOVE. So same sort of deal, really.
|
||
|
|
||
|
Jens Axboe
@axboe
|
Jan 31 |
|
That's exactly what it should work well for! Hopefully I can respin next week. I'll ping you, would love for someone else to run some testing, helps my case too.
|
||
|
|
||
|
Jens Axboe
@axboe
|
Jan 31 |
|
I think there was some discussion in the last series past that date, but I haven't had time to follow up yet. My plan is to pick it up, rebase it, and throw it back out there with some changes as soon as I can.
|
||
|
|
||
|
Jens Axboe
@axboe
|
Jan 31 |
|
Pavel is working on wiring up splice. I'm talking about making SPLICE_F_GIFT (vmsplice) work fully in conjunction with SPLICE_F_MOVE (splice) for moving those pages into the page cache. If we can do that, zero-copy buffered file writing is a thing, for example.
|
||
|
|
||
|
Jens Axboe
@axboe
|
Jan 31 |
|
It is. I have a very elegant way of doing it, but tweets are just a bit too short to detail it ;-)
|
||
|
|
||
|
Jens Axboe
@axboe
|
Jan 31 |
|
I'd be very surprised if we don't add splice for 5.7, I think that's almost a given. But someone needs to work on the page gifting part... I don't have the time.
|
||
|
|
||
|
Jens Axboe
@axboe
|
Jan 31 |
|
Once this gets wired up, I think the motivation is there to finally make page gifting work fully. With that, you can alloc data in your app, gift that data to the kernel, and write it to a file. All without having to copy the data, even once.
|
||
|
|
||
|
Jens Axboe
@axboe
|
Jan 31 |
|
This example just links reads and writes, it's showing you how to make dependent requests. The data is still copied. With splice, you are moving containers of pages around inside the kernel. Which means you can move data around without having to copy it.
|
||
|
|
||
|
Jens Axboe
@axboe
|
Jan 31 |
|
Here's a good table that's more useful than looking at kernel headers: lwn.net/Articles/81041…
|
||
|
|
||
|
Jens Axboe
@axboe
|
Jan 31 |
|
That's the correct understanding, maybe I should see if I can improve the wording in the PDF.
|
||
|
|
||
|
Jens Axboe
@axboe
|
Jan 31 |
|
This is a great Friday read. twitter.com/Cor3ntin/statu…
|
||
|
|
||
|
Jens Axboe
@axboe
|
Jan 31 |
|
A few questions/comments:
"a single system io_uring_enter" - missing "call"?
And any reason for the dummy read rather than a NOP?
|
||
|
|
||
|
Jens Axboe
@axboe
|
Jan 30 |
|
dpkg -L $package
|
||
|
|
||
|
Jens Axboe
@axboe
|
Jan 30 |
|
Busy updating io_uring man pages. Making everything current, but also including kernel version availability of previous features. You can always find the up-to-date set in liburing - at least for now, at some point I'll try and push these to the normal man pages package.
|
||
|
|
||
|
Jens Axboe
@axboe
|
Jan 30 |
|
|
||
|
Jens Axboe
@axboe
|
Jan 29 |
|
5.6 merge window changes for io_uring have now been merged. So many goodies in there, can't wait to see how 5.7 shapes up in the coming months.
git.kernel.org/pub/scm/linux/…
|
||
|
|
||