[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e194e550-e7e5-4df6-bda1-eb1141777ce5@web.de>
Date: Sat, 13 Jul 2024 22:26:21 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Babu Moger <babu.moger@....com>, x86@...nel.org,
Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>,
Fenghua Yu <fenghua.yu@...el.com>, Ingo Molnar <mingo@...hat.com>,
Jonathan Corbet <corbet@....net>, Reinette Chatre
<reinette.chatre@...el.com>, Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>, linux-doc@...r.kernel.org,
Breno Leitao <leitao@...ian.org>,
Daniel Sneddon <daniel.sneddon@...ux.intel.com>,
"H. Peter Anvin" <hpa@...or.com>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
James Morse <james.morse@....com>, Jim Mattson <jmattson@...gle.com>,
Jithu Joseph <jithu.joseph@...el.com>, Josh Poimboeuf <jpoimboe@...nel.org>,
Julia Lawall <julia.lawall@...ia.fr>, Kai Huang <kai.huang@...el.com>,
Kan Liang <kan.liang@...ux.intel.com>, Kim Phillips <kim.phillips@....com>,
Lukas Bulwahn <lukas.bulwahn@...il.com>,
Maciej Wieczor-Retman <maciej.wieczor-retman@...el.com>,
Paolo Bonzini <pbonzini@...hat.com>, "Paul E. McKenney"
<paulmck@...nel.org>, Peter Newman <peternewman@...gle.com>,
Peter Zijlstra <peterz@...radead.org>, Randy Dunlap <rdunlap@...radead.org>,
Rick Edgecombe <rick.p.edgecombe@...el.com>,
Sandipan Das <sandipan.das@....com>, Sean Christopherson
<seanjc@...gle.com>, Stephane Eranian <eranian@...gle.com>,
Tejun Heo <tj@...nel.org>, Yan-Jie Wang <yanjiewtw@...il.com>
Subject: Re: [PATCH v5 16/20] x86/resctrl: Report "Unassigned" for MBM events
in ABMC mode
…
> +++ b/arch/x86/kernel/cpu/resctrl/ctrlmondata.c
…
> @@ -609,12 +609,21 @@ int rdtgroup_mondata_show(struct seq_file *m, void *arg)
…
+ if (resctrl_arch_get_abmc_enabled()) {
+ index = mon_event_config_index_get(evtid);
+ if (rdtgrp->mon.cntr_id[index] == MON_CNTR_UNSET)
+ seq_puts(m, "Unassigned\n");
+ else
+ seq_puts(m, "Unavailable\n");
+ } else {
…
I suggest to restrict the scope for the shown local variable to this if branch.
How do you think about to apply a code variant like the following?
int index = mon_event_config_index_get(evtid);
seq_puts(m,
(rdtgrp->mon.cntr_id[index] == MON_CNTR_UNSET
? "Unassigned\n"
: "Unavailable\n") );
Regards,
Markus
Powered by blists - more mailing lists