Skip to content

Commit

Permalink
sched/fair: Kill spam about max cpu_capacity
Browse files Browse the repository at this point in the history
When thermal throttling is happening on a system the serial console
log can get really, really chatty if you've got CONFIG_SCHED_DEBUG
turned on.  On some machines that thermally throttle all the time,
like rk3288-veyron-mickey, we see ~5 spams a second.

This chattiness is rarely super useful.  Let's just kill it.

NOTES:
1. Another option here might be to turn it into pr_debug.  I opted not
   to do this because I noticed that on 4.4 we had actually found a
   deadlock with this particular printout.  See
   <https://crrev.com/c/420092>.  Rather than dig to see if the
   deadlock has been worked around in other ways, it seemed more
   expedient to just kill it.
2. In theory we could turn off CONFIG_SCHED_DEBUG.  I seem to remember
   we kept this on for some good reason but I can't seem to find out
   why.  Since we've had CONFIG_SCHED_DEBUG on for all prior kernels
   I'm going to assume we still want it.

NOTE: The chattiness comes from commit 2b98b9f66c93 ("ANDROID: sched:
Update max cpu capacity in case of max frequency constraints") which
is not an upstream commit.  Hence this is a CHROMIUM patch.  I presume
that as EAS make it more upstream they will either not have this spam
or we can post this upstream when the spam is there.

BUG=chromium:941638
TEST=No more log spam

Change-Id: Ia208861de5e7b7ef6350f881321e448df47713a8
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1597412
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Quentin Perret <quentin.perret@arm.com>
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Signed-off-by: engstk <eng.stk@sapo.pt>
Signed-off-by: Dakkshesh <dakkshesh5@gmail.com>
Signed-off-by: TogoFire <italomellopereira@gmail.com>
  • Loading branch information
dianders authored and TogoFire committed Oct 1, 2022
1 parent 96120ec commit 542c304
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions kernel/sched/fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -9271,17 +9271,9 @@ static void update_cpu_capacity(struct sched_domain *sd, int cpu)
(max_capacity < capacity)) {
mcc->val = capacity;
mcc->cpu = cpu;
#ifdef CONFIG_SCHED_DEBUG
raw_spin_unlock_irqrestore(&mcc->lock, flags);
printk_deferred(KERN_INFO "CPU%d: update max cpu_capacity %lu\n",
cpu, capacity);
goto skip_unlock;
#endif
}
raw_spin_unlock_irqrestore(&mcc->lock, flags);

skip_unlock: __attribute__ ((unused));

capacity *= scale_rt_capacity(cpu);
capacity >>= SCHED_CAPACITY_SHIFT;

Expand Down

0 comments on commit 542c304

Please sign in to comment.