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: <c27972ef-1b17-36dd-50b8-790f7994733f@intel.com>
Date:   Thu, 11 May 2023 14:40:43 -0700
From:   Reinette Chatre <reinette.chatre@...el.com>
To:     Peter Newman <peternewman@...gle.com>,
        Fenghua Yu <fenghua.yu@...el.com>
CC:     Babu Moger <babu.moger@....com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>, <x86@...nel.org>,
        "H. Peter Anvin" <hpa@...or.com>,
        Stephane Eranian <eranian@...gle.com>,
        James Morse <james.morse@....com>,
        <linux-kernel@...r.kernel.org>, <linux-kselftest@...r.kernel.org>
Subject: Re: [PATCH v1 8/9] x86/resctrl: Use mbm_update() to push soft RMID
 counts

Hi Peter,

On 4/21/2023 7:17 AM, Peter Newman wrote:
> @@ -806,12 +811,27 @@ void mbm_handle_overflow(struct work_struct *work)
>  	r = &rdt_resources_all[RDT_RESOURCE_L3].r_resctrl;
>  	d = container_of(work, struct rdt_domain, mbm_over.work);
>  
> +	if (rdt_mon_soft_rmid) {
> +		/*
> +		 * HW RMIDs are permanently assigned to CPUs, so only a per-CPU
> +		 * flush is needed.
> +		 */
> +		on_each_cpu_mask(&d->cpu_mask, mbm_flush_cpu_handler, NULL,
> +				 false);
> +	}
> +
>  	list_for_each_entry(prgrp, &rdt_all_groups, rdtgroup_list) {
> -		mbm_update(r, d, prgrp->mon.rmid);
> +		/*
> +		 * mbm_update() on every RMID would result in excessive IPIs
> +		 * when RMIDs are soft.
> +		 */
> +		if (!rdt_mon_soft_rmid) {
> +			mbm_update(r, d, prgrp->mon.rmid);
>  
> -		head = &prgrp->mon.crdtgrp_list;
> -		list_for_each_entry(crgrp, head, mon.crdtgrp_list)
> -			mbm_update(r, d, crgrp->mon.rmid);
> +			head = &prgrp->mon.crdtgrp_list;
> +			list_for_each_entry(crgrp, head, mon.crdtgrp_list)
> +				mbm_update(r, d, crgrp->mon.rmid);
> +		}
>  
>  		if (is_mba_sc(NULL))
>  			update_mba_bw(prgrp, d);


hmmm ... I think that update_mba_bw() relies on mbm_update() to call
mbm_bw_count() to update the data it depends on. Keeping update_mba_bw()
while dropping mbm_update() thus seems problematic. AMD does not support the
software controller though so it may make things simpler if support for
software RMIDs disables support for software controller (in a clear way).

Reinette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ