From 542c3040e9b602fb2bf9d803d79d27e72e54db0e Mon Sep 17 00:00:00 2001 From: Douglas Anderson Date: Fri, 7 May 2021 19:49:12 +0200 Subject: [PATCH] sched/fair: Kill spam about max cpu_capacity 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 . 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 Reviewed-on: https://chromium-review.googlesource.com/1597412 Reviewed-by: Nicolas Boichat Reviewed-by: Quentin Perret Reviewed-by: Sonny Rao Signed-off-by: engstk Signed-off-by: Dakkshesh Signed-off-by: TogoFire --- kernel/sched/fair.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 3e75e6381000..4c6303faa2ec 100755 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -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;