linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] interconnect: Show bandwidth for disabled paths as zero in debugfs
@ 2020-07-29 17:50 Matthias Kaehlcke
  2020-08-25  0:08 ` Matthias Kaehlcke
  2020-08-25  3:22 ` Evan Green
  0 siblings, 2 replies; 4+ messages in thread
From: Matthias Kaehlcke @ 2020-07-29 17:50 UTC (permalink / raw)
  To: Georgi Djakov
  Cc: linux-kernel, linux-pm, Evan Green, Douglas Anderson, Matthias Kaehlcke

For disabled paths the 'interconnect_summary' in debugfs currently shows
the orginally requested bandwidths. This is confusing, since the bandwidth
requests aren't active. Instead show the bandwidths for disabled
paths/requests as zero.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---

 drivers/interconnect/core.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c
index 609e206bf598..3491175304d1 100644
--- a/drivers/interconnect/core.c
+++ b/drivers/interconnect/core.c
@@ -55,12 +55,18 @@ static int icc_summary_show(struct seq_file *s, void *data)
 
 			icc_summary_show_one(s, n);
 			hlist_for_each_entry(r, &n->req_list, req_node) {
+				u32 avg_bw = 0, peak_bw = 0;
+
 				if (!r->dev)
 					continue;
 
+				if (r->enabled) {
+					avg_bw = r->avg_bw;
+					peak_bw = r->peak_bw;
+				}
+
 				seq_printf(s, "  %-27s %12u %12u %12u\n",
-					   dev_name(r->dev), r->tag, r->avg_bw,
-					   r->peak_bw);
+					   dev_name(r->dev), r->tag, avg_bw, peak_bw);
 			}
 		}
 	}
-- 
2.28.0.rc0.142.g3c755180ce-goog


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] interconnect: Show bandwidth for disabled paths as zero in debugfs
  2020-07-29 17:50 [PATCH] interconnect: Show bandwidth for disabled paths as zero in debugfs Matthias Kaehlcke
@ 2020-08-25  0:08 ` Matthias Kaehlcke
  2020-08-27 13:32   ` Georgi Djakov
  2020-08-25  3:22 ` Evan Green
  1 sibling, 1 reply; 4+ messages in thread
From: Matthias Kaehlcke @ 2020-08-25  0:08 UTC (permalink / raw)
  To: Georgi Djakov; +Cc: linux-kernel, linux-pm, Evan Green, Douglas Anderson

On Wed, Jul 29, 2020 at 10:50:12AM -0700, Matthias Kaehlcke wrote:
> For disabled paths the 'interconnect_summary' in debugfs currently shows
> the orginally requested bandwidths. This is confusing, since the bandwidth
> requests aren't active. Instead show the bandwidths for disabled
> paths/requests as zero.
> 
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>

ping, any comments on this?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] interconnect: Show bandwidth for disabled paths as zero in debugfs
  2020-07-29 17:50 [PATCH] interconnect: Show bandwidth for disabled paths as zero in debugfs Matthias Kaehlcke
  2020-08-25  0:08 ` Matthias Kaehlcke
@ 2020-08-25  3:22 ` Evan Green
  1 sibling, 0 replies; 4+ messages in thread
From: Evan Green @ 2020-08-25  3:22 UTC (permalink / raw)
  To: Matthias Kaehlcke; +Cc: Georgi Djakov, LKML, linux-pm, Douglas Anderson

On Wed, Jul 29, 2020 at 10:50 AM Matthias Kaehlcke <mka@chromium.org> wrote:
>
> For disabled paths the 'interconnect_summary' in debugfs currently shows
> the orginally requested bandwidths. This is confusing, since the bandwidth
> requests aren't active. Instead show the bandwidths for disabled
> paths/requests as zero.
>
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>

Looks good to me. I briefly mulled over the idea of showing the
disabled flag as a separate column, but I can't really think of how
that would be useful.

Reviewed-by: Evan Green <evgreen@chromium.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] interconnect: Show bandwidth for disabled paths as zero in debugfs
  2020-08-25  0:08 ` Matthias Kaehlcke
@ 2020-08-27 13:32   ` Georgi Djakov
  0 siblings, 0 replies; 4+ messages in thread
From: Georgi Djakov @ 2020-08-27 13:32 UTC (permalink / raw)
  To: Matthias Kaehlcke; +Cc: linux-kernel, linux-pm, Evan Green, Douglas Anderson

Hi Matthias,

Thanks for the patch!

On 8/25/20 03:08, Matthias Kaehlcke wrote:
> On Wed, Jul 29, 2020 at 10:50:12AM -0700, Matthias Kaehlcke wrote:
>> For disabled paths the 'interconnect_summary' in debugfs currently shows
>> the orginally requested bandwidths. This is confusing, since the bandwidth
>> requests aren't active. Instead show the bandwidths for disabled
>> paths/requests as zero.
>>
>> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> 
> ping, any comments on this?
> 

Looks good to me! Just in case, I'll also add:
Fixes: 7d374b209083 ("interconnect: Add helpers for enabling/disabling a path")

Thanks,
Georgi

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-08-27 13:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-29 17:50 [PATCH] interconnect: Show bandwidth for disabled paths as zero in debugfs Matthias Kaehlcke
2020-08-25  0:08 ` Matthias Kaehlcke
2020-08-27 13:32   ` Georgi Djakov
2020-08-25  3:22 ` Evan Green

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).