-
Notifications
You must be signed in to change notification settings - Fork 205
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
Implement DSA plugin #494
Implement DSA plugin #494
Conversation
d1e203e
to
483dcf3
Compare
Codecov Report
@@ Coverage Diff @@
## master #494 +/- ##
==========================================
+ Coverage 56.70% 56.79% +0.09%
==========================================
Files 30 31 +1
Lines 2028 2111 +83
==========================================
+ Hits 1150 1199 +49
- Misses 807 838 +31
- Partials 71 74 +3
Continue to review full report at Codecov.
|
@bart0sh nice! can you capture this as an open item: we may need to have something similar what QAT plugin does with regards to binding the device to a certain driver? |
@mythi Thanks for pointing this out. That definitely makes sense for future work. On the current stage, however, we'll be fine with supporting 3 modes: user, kernel and mdev in my opinion. All of them are provided by idxd kernel driver and idxd is supported by DPDK IOAT Rawdev driver. That can cover most of use cases. Current draft PR is a POC supporting only user mode. I'm planning to extend it in the next 3-5 days to support kernel and mdev modes + add support for shared and dedicated work queues. So, the device resource would look like |
@bart0sh is |
@mythi work queue is the only consumable DSA resource as far as I understand. Other DSA resources (engines and devices) are used mostly for configuration purposes. All userspace libraries I've examined work with queues, i.e. with /dev/dsa/wqN.N device nodes and symlinks. kernel mode resources don't need to be exposed to the containers as far as I can see. However, they can ensure that either other workflows are not using DSA device in dedicated mode or that amount of other workflows using the device is not higher than plugin would allow in shared mode. It can only happen if all workflows working with the devices only after requesting them. |
As a user I would probably be not interested in a particular queue, e.g. wq0.1, but in just any queue available. Then at runtime I'd configure my software to work with the allocated queue. The name of the queue could be passed with an env variable. Does it make sense? |
@rojkov users might be interested in using multiple queues on the same device for performance reasons. On a workload level queue names are usually hidden from users by high level userspace APIs. Configuration of the queues should be done by cluster admin from my point of view. User would just specify which queues are needed for the workflow. |
@rojkov I should've explained queue naming scheme better. Its format is wqD.N, where D is a device number and N is a queue number. |
@mythi That would make sense for the same type of queues. However, I'd not suggest doing this unless we want to restrict plugin to share only one type of queues or something similar. |
It sounds like a node is going to have only one available resource per type (the types are 4 dimensional: 1) device, 2) queue, 3) user/mdev, 4) dedicated/shared) and users are supposed to know which particular queue to use. Right? Is it possible to have |
@rojkov queue can't have 2 types at the same time, so having After giving your idea more thought I think it makes sense to group work queues by their types, i.e. having resourse names |
@mythi @rojkov just discovered that queues can be given a name. Not sure it matters anyhow as device nodes will be named the same way, e.g. Another thing is grouping. DSA engines and queues can be grouped. I was not going to expose this info at least in the first plugin version. What's your opinion? I'm still thinking that exposing 2 types (shared-dedicated and kernel-user-mdev) should be enough for majority of use cases. Thoughts? |
I'd start with |
+1 |
@bart0sh let's start with basic resources as discussed earlier and add configurability/grouping later. |
ca22ed7
to
3b1b99d
Compare
9d62b37
to
5677540
Compare
5677540
to
62fb5fc
Compare
Signed-off-by: Ed Bartosh <[email protected]>
62fb5fc
to
1746434
Compare
This plugin discovers DSA work queues in /sys/bus/dsa/devices/
For the queues in "user" mode it looks for
/dev/dsa/wqN.N
device nodes and correspondent/dev/char/<major>.<minor>
symlinksHere is how the work queue resources are described in the
kubectl describe node
output:Ref: #442