Skip to content

Commit 5fe4322

Browse files
committed
Revert readv optimization in virtio-net device
The changes introduced in IoVecBufferMut that allowed implementing readv support for virtio-net regressed the performance of vsock device. This is because now, when we create IoVecBufferMut objects we do a bunch (1 memfd_create and 3 mmap) of system calls. virtio-net device avoids the performance issue because it creates a single IoVecBufferMut and re-uses it, whereas vsock is creating a new IoVecBufferMut object for every packet it receives. We have a fix for this, which essentially creates a single IoVecBufferMut that reuses for all the incoming vsock packets during a connection. The problem with the fix is that it makes unit-tests really unhappy and we need a significant amount of work to fix them. So, revert the PR to have main in a clean state. We will fix the vsock issues out-of-band and re-open the PR. This reverts commits: - bc0ba43 - 667aba4 - 5d718d4 - 14e6e33 - 1e4c632 from PR #4799 Signed-off-by: Babis Chalios <[email protected]>
1 parent bc0ba43 commit 5fe4322

File tree

13 files changed

+342
-1288
lines changed

13 files changed

+342
-1288
lines changed

resources/seccomp/aarch64-unknown-linux-musl.json

Lines changed: 0 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -32,108 +32,6 @@
3232
"syscall": "writev",
3333
"comment": "Used by the VirtIO net device to write to tap"
3434
},
35-
{
36-
"syscall": "readv",
37-
"comment": "Used by the VirtIO net device to read from tap"
38-
},
39-
{
40-
"syscall": "memfd_create",
41-
"comment": "Used by the IovDeque implementation"
42-
},
43-
{
44-
"syscall": "fcntl",
45-
"comment": "Used by the IovDeque implementation",
46-
"args": [
47-
{
48-
"index": 1,
49-
"type": "dword",
50-
"op": "eq",
51-
"val": 1033,
52-
"comment": "FCNTL_F_SETFD"
53-
},
54-
{
55-
"index": 2,
56-
"type": "dword",
57-
"op": "eq",
58-
"val": 6,
59-
"comment": "F_SEAL_SHRINK|F_SEAL_GROW"
60-
}
61-
]
62-
},
63-
{
64-
"syscall": "fcntl",
65-
"comment": "Used by the IovDeque implementation",
66-
"args": [
67-
{
68-
"index": 1,
69-
"type": "dword",
70-
"op": "eq",
71-
"val": 1033,
72-
"comment": "FCNTL_F_SETFD"
73-
},
74-
{
75-
"index": 2,
76-
"type": "dword",
77-
"op": "eq",
78-
"val": 1,
79-
"comment": "F_SEAL_SEAL"
80-
}
81-
]
82-
},
83-
{
84-
"syscall": "mmap",
85-
"comment": "Used by the IovDeque implementation",
86-
"args": [
87-
{
88-
"index": 1,
89-
"type": "dword",
90-
"op": "eq",
91-
"val": 4096,
92-
"comment": "Page size allocation"
93-
},
94-
{
95-
"index": 2,
96-
"type": "dword",
97-
"op": "eq",
98-
"val": 3,
99-
"comment": "PROT_READ|PROT_WRITE"
100-
},
101-
{
102-
"index": 3,
103-
"type": "dword",
104-
"op": "eq",
105-
"val": 17,
106-
"comment": "MAP_SHARED|MAP_FIXED"
107-
}
108-
]
109-
},
110-
{
111-
"syscall": "mmap",
112-
"comment": "Used by the IovDeque implementation",
113-
"args": [
114-
{
115-
"index": 1,
116-
"type": "dword",
117-
"op": "eq",
118-
"val": 8192,
119-
"comment": "2 pages allocation"
120-
},
121-
{
122-
"index": 2,
123-
"type": "dword",
124-
"op": "eq",
125-
"val": 0,
126-
"comment": "PROT_NONE"
127-
},
128-
{
129-
"index": 3,
130-
"type": "dword",
131-
"op": "eq",
132-
"val": 34,
133-
"comment": "MAP_PRIVATE|MAP_ANONYMOUS"
134-
}
135-
]
136-
},
13735
{
13836
"syscall": "fsync"
13937
},

resources/seccomp/x86_64-unknown-linux-musl.json

Lines changed: 0 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -32,108 +32,6 @@
3232
"syscall": "writev",
3333
"comment": "Used by the VirtIO net device to write to tap"
3434
},
35-
{
36-
"syscall": "readv",
37-
"comment": "Used by the VirtIO net device to read from tap"
38-
},
39-
{
40-
"syscall": "memfd_create",
41-
"comment": "Used by the IovDeque implementation"
42-
},
43-
{
44-
"syscall": "fcntl",
45-
"comment": "Used by the IovDeque implementation",
46-
"args": [
47-
{
48-
"index": 1,
49-
"type": "dword",
50-
"op": "eq",
51-
"val": 1033,
52-
"comment": "FCNTL_F_SETFD"
53-
},
54-
{
55-
"index": 2,
56-
"type": "dword",
57-
"op": "eq",
58-
"val": 6,
59-
"comment": "F_SEAL_SHRINK|F_SEAL_GROW"
60-
}
61-
]
62-
},
63-
{
64-
"syscall": "fcntl",
65-
"comment": "Used by the IovDeque implementation",
66-
"args": [
67-
{
68-
"index": 1,
69-
"type": "dword",
70-
"op": "eq",
71-
"val": 1033,
72-
"comment": "FCNTL_F_SETFD"
73-
},
74-
{
75-
"index": 2,
76-
"type": "dword",
77-
"op": "eq",
78-
"val": 1,
79-
"comment": "F_SEAL_SEAL"
80-
}
81-
]
82-
},
83-
{
84-
"syscall": "mmap",
85-
"comment": "Used by the IovDeque implementation",
86-
"args": [
87-
{
88-
"index": 1,
89-
"type": "dword",
90-
"op": "eq",
91-
"val": 4096,
92-
"comment": "Page size allocation"
93-
},
94-
{
95-
"index": 2,
96-
"type": "dword",
97-
"op": "eq",
98-
"val": 3,
99-
"comment": "PROT_READ|PROT_WRITE"
100-
},
101-
{
102-
"index": 3,
103-
"type": "dword",
104-
"op": "eq",
105-
"val": 17,
106-
"comment": "MAP_SHARED|MAP_FIXED"
107-
}
108-
]
109-
},
110-
{
111-
"syscall": "mmap",
112-
"comment": "Used by the IovDeque implementation",
113-
"args": [
114-
{
115-
"index": 1,
116-
"type": "dword",
117-
"op": "eq",
118-
"val": 8192,
119-
"comment": "2 pages allocation"
120-
},
121-
{
122-
"index": 2,
123-
"type": "dword",
124-
"op": "eq",
125-
"val": 0,
126-
"comment": "PROT_NONE"
127-
},
128-
{
129-
"index": 3,
130-
"type": "dword",
131-
"op": "eq",
132-
"val": 34,
133-
"comment": "MAP_PRIVATE|MAP_ANONYMOUS"
134-
}
135-
]
136-
},
13735
{
13836
"syscall": "fsync"
13937
},

0 commit comments

Comments
 (0)