lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Zz9wVHIzbgL9ob21@agluck-desk3>
Date: Thu, 21 Nov 2024 09:39:32 -0800
From: "Luck, Tony" <tony.luck@...el.com>
To: Reinette Chatre <reinette.chatre@...el.com>
Cc: Fenghua Yu <fenghua.yu@...el.com>,
	Peter Newman <peternewman@...gle.com>,
	Jonathan Corbet <corbet@....net>, x86@...nel.org,
	James Morse <james.morse@....com>,
	Jamie Iles <quic_jiles@...cinc.com>,
	Babu Moger <babu.moger@....com>,
	Randy Dunlap <rdunlap@...radead.org>,
	"Shaopeng Tan (Fujitsu)" <tan.shaopeng@...itsu.com>,
	linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
	patches@...ts.linux.dev
Subject: Re: [PATCH v9 5/9] x86/resctrl: Relax checks for mba_MBps mount
 option

On Tue, Nov 19, 2024 at 07:54:10PM -0800, Reinette Chatre wrote:
> Hi Tony,
> 
> On 11/13/24 4:17 PM, Tony Luck wrote:
> > This option may be used with any memory bandwidth monitoring event.
> 
> Needs a changelog.

Added one.

> > 
> > Signed-off-by: Tony Luck <tony.luck@...el.com>
> > ---
> >  arch/x86/kernel/cpu/resctrl/rdtgroup.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c b/arch/x86/kernel/cpu/resctrl/rdtgroup.c
> > index a8022bddf9f7..3a89516e6f56 100644
> > --- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c
> > +++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c
> > @@ -2334,7 +2334,7 @@ static bool supports_mba_mbps(void)
> >  	struct rdt_resource *rmbm = &rdt_resources_all[RDT_RESOURCE_L3].r_resctrl;
> >  	struct rdt_resource *r = &rdt_resources_all[RDT_RESOURCE_MBA].r_resctrl;
> >  
> > -	return (is_mbm_local_enabled() &&
> > +	return (is_mbm_enabled() &&
> >  		r->alloc_capable && is_mba_linear() &&
> >  		r->ctrl_scope == rmbm->mon_scope);
> >  }
> 
> I *thought* I had a handle on things with the understanding that rdtgroup.mba_mbps_event
> is only valid when mba_sc is enabled. This understanding falls apart with this change since
> at this point in series if a system only supports total MBM then mba_sc may be true
> but rdtgroup.mba_mbps_event will be zero.
> 
> The expectation is that patches build on each other to create a solution but this series
> does not respect this making it difficult to reason about this work.  I think this series
> will be easier to understand if "x86/resctrl: Make mba_sc use total bandwidth if local
> is not supported" is moved before this change.

Rather than moving that patch before this one, I've merged it into this
patch since both are small and intimately connected.

> > @@ -2759,7 +2759,7 @@ static int rdt_parse_param(struct fs_context *fc, struct fs_parameter *param)
> >  		ctx->enable_cdpl2 = true;
> >  		return 0;
> >  	case Opt_mba_mbps:
> > -		msg = "mba_MBps requires local MBM and linear scale MBA at L3 scope";
> > +		msg = "mba_MBps requires MBM and linear scale MBA at L3 scope";
> >  		if (!supports_mba_mbps())
> >  			return invalfc(fc, msg);
> >  		ctx->enable_mba_mbps = true;
> 
> Reinette

-Tony

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ