Files
twx-linux/kernel
Dietmar Eggemann f1be5e60c6 FROMGIT: sched/deadline: Reduce rq lock contention in dl_add_task_root_domain()
dl_add_task_root_domain() is called during sched domain rebuild:

  rebuild_sched_domains_locked()
    partition_and_rebuild_sched_domains()
      rebuild_root_domains()
         for all top_cpuset descendants:
           update_tasks_root_domain()
             for all tasks of cpuset:
               dl_add_task_root_domain()

Change it so that only the task pi lock is taken to check if the task
has a SCHED_DEADLINE (DL) policy. In case that p is a DL task take the
rq lock as well to be able to safely de-reference root domain's DL
bandwidth structure.

Most of the tasks will have another policy (namely SCHED_NORMAL) and
can now bail without taking the rq lock.

One thing to note here: Even in case that there aren't any DL user
tasks, a slow frequency switching system with cpufreq gov schedutil has
a DL task (sugov) per frequency domain running which participates in DL
bandwidth management.

Bug: 174590586
(cherry picked from commit e6d97c38b59265499e94afb79eb5b2eb6c33edfb
 git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/core)
Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Quentin Perret <qperret@google.com>
Reviewed-by: Valentin Schneider <valentin.schneider@arm.com>
Reviewed-by: Daniel Bristot de Oliveira <bristot@redhat.com>
Acked-by: Juri Lelli <juri.lelli@redhat.com>
Link: https://lkml.kernel.org/r/20210119083542.19856-1-dietmar.eggemann@arm.com
Change-Id: Ia28d47671c180e95c4a1b65e7aae99c7c0e9c72b
2021-02-10 10:48:24 +00:00
..
2021-01-13 10:28:55 +01:00
2021-02-10 09:53:50 +01:00
2021-02-08 20:05:12 -08:00
2021-02-05 10:38:34 +01:00
2021-01-30 14:29:02 +01:00
2021-02-10 09:53:50 +01:00
2021-01-30 14:29:02 +01:00
2021-02-08 20:05:12 -08:00
2020-11-14 11:26:04 -08:00
2021-01-13 10:28:55 +01:00
2021-02-07 15:37:17 +01:00
2020-10-29 06:32:38 +01:00
2021-02-08 20:05:12 -08:00