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

iouring sq poll and io poll #683

Merged
merged 1 commit into from
Dec 26, 2024
Merged

Conversation

lihuiba
Copy link
Collaborator

@lihuiba lihuiba commented Dec 23, 2024

No description provided.

@lihuiba lihuiba linked an issue Dec 23, 2024 that may be closed by this pull request
@lihuiba lihuiba force-pushed the iouring_kernel_poll branch 4 times, most recently from 8dfb1df to 0fff281 Compare December 24, 2024 03:11
int ret = io_uring_submit(m_ring);
if (ret < 0)
LOG_ERROR_RETURN(-ret, -1, "iouring: fail to submit when adding interest, ", ERRNO(-ret));

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We used to only submit IO in the reap process, in order to reduce the number of syscalls.

Will it cause performance decline?

Copy link
Collaborator Author

@lihuiba lihuiba Dec 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have it in add_interest() and rm_interest(). It might be missing here?

photon.h Outdated
#endif

#undef SHIFT

struct PhotonOptions {
int libaio_queue_depth = 32;
uint32_t iouring_sq_thread_cpu;
uint32_t iouring_sq_thread_idle = 1000; // by default polls for 1s
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename to iouring_sq_thread_idle_ms ?

@lihuiba lihuiba force-pushed the iouring_kernel_poll branch from 0fff281 to 3026e27 Compare December 25, 2024 02:58
@lihuiba lihuiba force-pushed the iouring_kernel_poll branch from 3026e27 to f4fcf35 Compare December 25, 2024 03:04
@lihuiba lihuiba requested a review from beef9999 December 25, 2024 03:11
make_named_value("setup_sq_aff", args.setup_sq_aff),
make_named_value("sq_thread_cpu", args.sq_thread_cpu));
auto uring = NewObj<iouringEngine>() -> init(args);
if (args.is_master) return uring;
Copy link
Collaborator

@beef9999 beef9999 Dec 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uring's type is MasterEventEngine* ? Don't need to do conversion?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need for the 1st parent class

@lihuiba lihuiba merged commit a6b533c into alibaba:main Dec 26, 2024
12 checks passed
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

Successfully merging this pull request may close these issues.

Feature Request: Support for Kernel Side Polling in io_uring
2 participants