Skip to content

Conversation

@soburi
Copy link
Member

@soburi soburi commented Sep 13, 2025

Add SCHEDOP_poll wrapper used by Xen backends to wait on event channels efficiently.

  • sched
    • sched_poll: HYPERVISOR_sched_op(SCHEDOP_poll)

Note: This PR extracted from #91605

@soburi soburi marked this pull request as ready for review September 13, 2025 02:12
@soburi soburi force-pushed the xen_sched_poll branch 2 times, most recently from 69e2f66 to 0242b31 Compare September 14, 2025 23:47
Copy link

@lorc lorc left a comment

Choose a reason for hiding this comment

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

Hi Tokita-san,

Are you sure you want to use this particular hypercall? IMO it is better to use bind_interdomain_event_channel API.

You see, Zephyr is Realtime OS, and blocking the whole vCPU to wait for one event among many can cause issues.

#include <zephyr/arch/arm64/hypercall.h>
#include <zephyr/xen/sched.h>

int sched_poll(evtchn_port_t *ports, unsigned int nr_ports, uint64_t timeout)
Copy link

Choose a reason for hiding this comment

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

taking into account that Zephyr have no namespaces, maybe it is better to add some prefix to name of this function? xen_sched_poll() maybe?

Copy link
Member Author

Choose a reason for hiding this comment

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

I fixed it.

However, as you pointed out, when I looked closely at the processing of my PR (#91605),
I found that it had already been deleted. It seems that it had been used during the development process and was still there.
It's not a bad thing to have it, but I will withdraw this PR for now to avoid increasing the number of things I need to manage.

Add SCHEDOP_poll wrapper used by Xen backends to wait on event
channels efficiently.

- sched
  - sched_poll:
    HYPERVISOR_sched_op(SCHEDOP_poll)

Signed-off-by: TOKITA Hiroshi <[email protected]>
@sonarqubecloud
Copy link

@soburi soburi closed this Sep 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants