Comments (6)
Sorry, put the file here.
Uploading error_result.docx…
from liburing.
Please just paste your code and the errors into the GitHub issue, I really don't want to download random word documents for something that should just be readily readable in here. Include what kernel you are using as well.
from liburing.
Hi,
I directly simplified the wq aff. c program for testing, and the program is as follows:
#####################################################################
/* SPDX-License-Identifier: MIT /
/
- Description: test that io-wq affinity is correctly set for SQPOLL
*/
#define _GNU_SOURCE
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <liburing.h>
#include <sched.h>
// #include "helpers.h"
#define IOWQ_CPU 0
#define SQPOLL_CPU 1
static int test(int sqpoll)
{
struct io_uring_params p = { };
struct io_uring ring;
struct io_uring_sqe *sqe;
char buf[64];
int fds[2], ret;
cpu_set_t set;
if (sqpoll) {
p.flags = IORING_SETUP_SQPOLL | IORING_SETUP_SQ_AFF;
p.sq_thread_cpu = SQPOLL_CPU;
}
io_uring_queue_init_params(8, &ring, &p);
CPU_ZERO(&set);
CPU_SET(IOWQ_CPU, &set);
ret = io_uring_register_iowq_aff(&ring, sizeof(set), &set);
if (ret) {
fprintf(stderr, "register aff: %d\n", ret);
}
if (pipe(fds) < 0) {
perror("pipe");
}
sqe = io_uring_get_sqe(&ring);
io_uring_prep_read(sqe, fds[0], buf, sizeof(buf), 0);
sqe->flags |= IOSQE_ASYNC;
io_uring_submit(&ring);
usleep(10000);
io_uring_queue_exit(&ring);
return ret;
}
int main(int argc, char *argv[])
{
int ret;
ret = test(1);
return 0;
}
from liburing.
Hi,
The test results are as follows:
[root@localhost wxh]# ./wxh_iouring io_uring.conf
register aff: -22
[root@localhost wxh]# ./wxh_iouring
register aff: -22
from liburing.
Hi,
The kernel version I tested is as follows:
5.10.0-136.12.0.86.oe2203sp1.x86_64
from liburing.
I don't know what version of kernel that is, but if you get -EINVAL, then it's too old to support WQ_AFF. The current 5.10-stable trees do support it, but older ones do not.
from liburing.
Related Issues (20)
- SOCKET_URING_OP_GETSOCKOPT hangs HOT 13
- `io_uring_prep_recv` does not return `0`? HOT 2
- Question: will io_uring block in this scenario in the same way as libaio? HOT 7
- io_uring read multishot fails when trying to read a tty HOT 8
- Is there a way to synchronously wait for a completion of a submitted write for a particular FD HOT 2
- redefinition of 'struct in6_pktinfo' when building on ubi7 with gcc/g++ 9.5.0 HOT 5
- Can we know how many bytes we have read by using io_uring_prep_readv method? HOT 1
- RCU calls made by the NAPI busy poll code generates context switches occupying 50% of the time of the CPU hosting the sqp thread HOT 92
- Per-iovec zero-copy and fixed buffer settings for writev/sendmsg HOT 5
- possible socket leakage with direct file descriptors HOT 21
- Ordering guarantees between accept and close? HOT 11
- SYSCHK(syscall(__NR_io_uring_setup, 10, ¶ms)): Invalid argument HOT 3
- io_uring openat non-existing file, cqe->res returns -2, outside of specification HOT 2
- io_uring_prep_recv with IORING_RECVSEND_BUNDLE always fills only one buffer at a time HOT 13
- io_uring_prep_send_bundle should not have len argument HOT 5
- Wrong number of arguments in io_uring_prep_fixed_fd_install man
- test buf-ring-nommap.t failed with -12 (-ENOMEM) in ppc64le arch.
- Long tail between submit event to complete event exceed 1 second
- SQE timeout with IORING_TIMEOUT_ETIME_SUCCESS set return a CQE with res field equal to -ETIME HOT 4
- io_poll and sqpoll cause IOPS degradation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from liburing.