Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Cleanups and a small fix #203

Merged
merged 4 commits into from
May 17, 2024
Merged

Cleanups and a small fix #203

merged 4 commits into from
May 17, 2024

Conversation

htejun
Copy link
Collaborator

@htejun htejun commented May 17, 2024

  • rq online state could go out of sync across sched domain updates. Fixed.
  • rq online is now tracked with a flag in rq->scx.flags.
  • Dispatch buf moved into scx_dsp_ctx.
  • Other cleanups.

Some functions were using scx_rq local variable to cache rq->scx and
dequeue_task_scx() was taking scx_rq as an argument. "scx_rq->" isn't any
shorter than "rq->scx." and the inconsistency adds to confusion. Let's
always use rq.
No need for this to be a separate variable.

- As this removes symbol name collision, rename test_rq_online() to
  scx_rq_online().

- [un]likely() annotation moved from its users to scx_rq_online().

- On/offline status should agree with ops->cpu_on/offline(). In the existing
  code, the two states could deviate when rq_on/offline_scx() were called
  for sched domain updates. Fix it so that they always agree.
The two being separate variables only makes things cumbersome.

- Move scx_dsp_buf into scx_dsp_ctx and dynamically allocate the latter.

- Rename scx_dsp_ctx->buf_cursor to ->cursor for brevity.
@htejun htejun requested a review from Byte-Lab May 17, 2024 11:48
@Byte-Lab Byte-Lab merged commit c592e1c into sched_ext May 17, 2024
1 check failed
@Byte-Lab Byte-Lab deleted the htejun/cleanups branch May 17, 2024 14:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants