Re: [PATCH 1/2] sched_ext: change the variable name for slice refill event

From: Andrea Righi
Date: Thu Apr 17 2025 - 14:37:09 EST


Hi Honglei,

On Thu, Apr 17, 2025 at 04:07:07PM +0800, Honglei Wang wrote:
> SCX_EV_ENQ_SLICE_DFL gives the impression that the event only occurs
> when the tasks were enqueued, which seems not accurate. What it actually
> means is the refilling with defalt slice, and this can occur either when
> enqueue or pick_task. Let's change the variable to
> SCX_EV_REFILL_SLICE_DFL.
>
> Signed-off-by: Honglei Wang <jameshongleiwang@xxxxxxx>
> ---
> kernel/sched/ext.c | 22 +++++++++++-----------
> tools/sched_ext/scx_qmap.bpf.c | 4 ++--
> 2 files changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
> index 66bcd40a28ca..594087ac4c9e 100644
> --- a/kernel/sched/ext.c
> +++ b/kernel/sched/ext.c
> @@ -1517,10 +1517,10 @@ struct scx_event_stats {
> s64 SCX_EV_ENQ_SKIP_MIGRATION_DISABLED;
>
> /*
> - * The total number of tasks enqueued (or pick_task-ed) with a
> - * default time slice (SCX_SLICE_DFL).
> + * The total number of tasks slice refill with default time slice
> + * (SCX_SLICE_DFL).

Nit, how about:

Total number of times a task's time slice was refilled with the default
value (SCX_SLICE_DFL).

Thanks,
-Andrea