Skip to content

cpufreq: schedutil: move slow path from workqueue to SCHED_FIFO task

Viresh Kumar linux-pm lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 9 repliesIn review
  2. v13 patches 24 repliesSuperseded

Changes in v2 from the cover letter

- first patch is new based on Peter's suggestions.
- fixed indented label
- Moved kthread creation/destruction into separate routines
- Used MACRO instead of magic number '50'
- minor formatting, commenting and improved commit logs

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4cpufreq: schedutil: Avoid indented labelskernel/sched/cpufreq_schedutil.c+3 -30 replies
2/4cpufreq: schedutil: enable fast switch earlierkernel/sched/cpufreq_schedutil.c+11 -60 replies
3/4cpufreq: schedutil: move slow path from workqueue to SCHED_FIFO taskkernel/sched/cpufreq_schedutil.c+78 -74 replies
4/4cpufreq: schedutil: irq-work and mutex are only used in slow pathkernel/sched/cpufreq_schedutil.c+8 -53 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchPeter Zijlstra (Intel)
1/4
2/4
3/4A-b
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH V2 0/4] cpufreq: schedutil: move slow path from workqueue to SCHED_FIFO task

Hi,

If slow path frequency changes are conducted in a SCHED_OTHER context then they may be delayed for some amount of time, including indefinitely, when real time or deadline activity is taking place.

Move the slow path to a real time kernel thread using the kthread worker infrastructure. In the future the thread should be made SCHED_DEADLINE. The RT priority is arbitrarily set to 50 for now.

This was tested with Hackbench on ARM Exynos, dual core A15 platform and no regressions were seen. The third patch has more details on it.

This work was started by Steve Muckle, where he used a simple kthread instead of kthread-worker and that wasn't sufficient as some guarantees weren't met.

I was wondering if the same should be done for ondemand/conservative governors as well ?

V1->V2:
- first patch is new based on Peter's suggestions.
- fixed indented label
- Moved kthread creation/destruction into separate routines
- Used MACRO instead of magic number '50'
- minor formatting, commenting and improved commit logs

--
viresh

Viresh Kumar (4):
cpufreq: schedutil: Avoid indented labels
cpufreq: schedutil: enable fast switch earlier
cpufreq: schedutil: move slow path from workqueue to SCHED_FIFO task
cpufreq: schedutil: irq-work and mutex are only used in slow path

 kernel/sched/cpufreq_schedutil.c | 119 ++++++++++++++++++++++++++++++++-------
 1 file changed, 99 insertions(+), 20 deletions(-)
Signature · 1 line
2.7.1.410.g6faf27b