[PATCH v4 1/6] eventdev: introduce event pre-scheduling
Jerin Jacob
jerinjacobk at gmail.com
Fri Oct 4 06:47:09 CEST 2024
On Tue, Oct 1, 2024 at 7:44 PM <pbhagavatula at marvell.com> wrote:
>
> From: Pavan Nikhilesh <pbhagavatula at marvell.com>
>
> Event pre-scheduling improves scheduling performance by assigning events
> to event ports in advance when dequeues are issued.
> The dequeue operation initiates the pre-schedule operation, which completes
> in parallel without affecting the dequeued event flow contexts and
> dequeue latency.
>
> Event devices can indicate pre-scheduling capabilities using
> `RTE_EVENT_DEV_CAP_EVENT_PRESCHEDULE` and
> `RTE_EVENT_DEV_CAP_EVENT_PRESCHEDULE_ADAPTIVE` via the event device info
> function `info.event_dev_cap`.
>
> Applications can select the pre-schedule type and configure it through
> `rte_event_dev_config.preschedule_type` during `rte_event_dev_configure`.
>
> The supported pre-schedule types are:
> * `RTE_EVENT_DEV_PRESCHEDULE_NONE` - No pre-scheduling.
> * `RTE_EVENT_DEV_PRESCHEDULE` - Always issue a pre-schedule on dequeue.
> * `RTE_EVENT_DEV_PRESCHEDULE_ADAPTIVE` - Delay issuing pre-schedule until
> there are no forward progress constraints with the held flow contexts.
>
> Signed-off-by: Pavan Nikhilesh <pbhagavatula at marvell.com>
eventdev PMD maintainers,
Is anyone planning to review this series more? The general outlook of
the patch looks good to me. I will have a few minor comments. If there
are no other comments, I will merge early next week as RC1 PR.
> ---
> app/test/test_eventdev.c | 108 ++++++++++++++++++++
> doc/guides/eventdevs/features/default.ini | 1 +
> doc/guides/prog_guide/eventdev/eventdev.rst | 22 ++++
> doc/guides/rel_notes/release_24_11.rst | 8 ++
> lib/eventdev/rte_eventdev.h | 48 +++++++++
> 5 files changed, 187 insertions(+)
>
>
> +Event Pre-scheduling
> +~~~~~~~~~~~~~~~~~~~~
> +
> +Event pre-scheduling improves scheduling performance by assigning events to event ports in advance
> +when dequeues are issued.
> +The `rte_event_dequeue_burst` operation initiates the pre-schedule operation, which completes
> +in parallel without affecting the dequeued event flow contexts and dequeue latency.
> +On the next dequeue operation, the pre-scheduled events are dequeued and pre-schedule is initiated
> +again.
> +
> +An application can use event pre-scheduling if the event device supports it at either device
> +level or at a individual port level.
> +The application can check pre-schedule capability by checking if ``rte_event_dev_info.event_dev_cap``
can -> must
> +has the bit ``RTE_EVENT_DEV_CAP_PRESCHEDULE`` set, if present pre-scheduling can be enabled at device
> +configuration time by setting appropriate pre-schedule type in ``rte_event_dev_config.preschedule``.
Missing RTE_EVENT_DEV_CAP_PRESCHEDULE_ADAPTIVE cap doc.
> +
> +Currently, the following pre-schedule types are supported:
I think, we can remove “Currently”
> + * ``RTE_EVENT_DEV_PRESCHEDULE_NONE`` - No pre-scheduling.
> + * ``RTE_EVENT_DEV_PRESCHEDULE`` - Always issue a pre-schedule when dequeue is issued.
> + * ``RTE_EVENT_DEV_PRESCHEDULE_ADAPTIVE`` - Issue pre-schedule when dequeue is issued and there are
> + no forward progress constraints.
> +
>
> +#define RTE_EVENT_DEV_CAP_EVENT_PRESCHEDULE (1ULL << 16)
> +/**< Event device supports event pre-scheduling.
> + *
> + * When this capability is available, the application can enable event pre-scheduling on the event
> + * device to pre-schedule events to a event port when `rte_event_dequeue_burst()`
> + * is issued.
> + * The pre-schedule process starts with the `rte_event_dequeue_burst()` call and the
> + * pre-scheduled events are returned on the next `rte_event_dequeue_burst()` call.
> + *
> + * @see rte_event_dev_configure()
> + */
Doxygen for the new enum is missing.
>
> +typedef enum {
> + RTE_EVENT_DEV_PRESCHEDULE_NONE = 0,
Explicit 0 is not needed.
> + /* Disable pre-schedule across the event device or on a given event port.
Use Doxygen format across the series, i.e /**<
> + * @ref rte_event_dev_config.preschedule_type
> + */
> + RTE_EVENT_DEV_PRESCHEDULE,
> + /* Enable pre-schedule always across the event device or a given event port.
> + * @ref rte_event_dev_config.preschedule_type
> + * @see RTE_EVENT_DEV_CAP_EVENT_PRESCHEDULE
> + */
> + RTE_EVENT_DEV_PRESCHEDULE_ADAPTIVE,
> + /* Enable adaptive pre-schedule across the event device or a given event port.
> + * Delay issuing pre-schedule until there are no forward progress constraints with
> + * the held flow contexts.
> + * @ref rte_event_dev_config.preschedule_type
> + * @see RTE_EVENT_DEV_CAP_EVENT_PRESCHEDULE_ADAPTIVE
> + */
> +} rte_event_dev_preschedule_type_t;
> +
> /** Event device configuration structure */
> struct rte_event_dev_config {
> uint32_t dequeue_timeout_ns;
> @@ -752,6 +795,11 @@ struct rte_event_dev_config {
> * optimized for single-link usage, this field is a hint for how many
> * to allocate; otherwise, regular event ports and queues will be used.
> */
> + rte_event_dev_preschedule_type_t preschedule_type;
Please add ABI changes in doc/guides/rel_notes/release_24_11.rst
> + /**< Event pre-schedule type to use across the event device, if supported.
> + * @see RTE_EVENT_DEV_CAP_EVENT_PRESCHEDULE
> + * @see RTE_EVENT_DEV_CAP_EVENT_PRESCHEDULE_ADAPTIVE
> + */
> };
>
> /**
> --
> 2.25.1
>
More information about the dev
mailing list