linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* acpi/hmat: don't mix pxm and nid when setting memory target processor_pxm
@ 2019-10-28  9:11 Brice Goglin
  2019-11-29 12:54 ` Brice Goglin
  0 siblings, 1 reply; 3+ messages in thread
From: Brice Goglin @ 2019-10-28  9:11 UTC (permalink / raw)
  To: linux-acpi, Keith Busch, Rafael Wysocki; +Cc: LKML

On systems where PXMs and nids are in different order, memory initiators
exposed in sysfs could be wrong: On dual-socket CLX with SNC enabled
(4 nodes, 1 and 2 swapped between PXMs and nids), node1 would only
get node2 as initiator, and node2 would only get node1.

With this patch, we get node1 as the only initiator of itself,
and node2 as the only initiator of itself, as expected.

This should likely go to stable up to 5.2.

Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>

diff --git a/drivers/acpi/hmat/hmat.c b/drivers/acpi/hmat/hmat.c
index 8f9a28a870b0..3ca3c7c97ee0 100644
--- a/drivers/acpi/hmat/hmat.c
+++ b/drivers/acpi/hmat/hmat.c
@@ -417,7 +417,7 @@ static int __init hmat_parse_proximity_domain(union acpi_subtable_headers *heade
 			pr_debug("HMAT: Invalid Processor Domain\n");
 			return -EINVAL;
 		}
-		target->processor_pxm = p_node;
+		target->processor_pxm = p->processor_PD;
 	}
 
 	return 0;


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

* Re: acpi/hmat: don't mix pxm and nid when setting memory target processor_pxm
  2019-10-28  9:11 acpi/hmat: don't mix pxm and nid when setting memory target processor_pxm Brice Goglin
@ 2019-11-29 12:54 ` Brice Goglin
  2019-12-09 12:28   ` Rafael J. Wysocki
  0 siblings, 1 reply; 3+ messages in thread
From: Brice Goglin @ 2019-11-29 12:54 UTC (permalink / raw)
  To: linux-acpi, Keith Busch, Rafael Wysocki; +Cc: LKML

Le 28/10/2019 à 10:11, Brice Goglin a écrit :
> On systems where PXMs and nids are in different order, memory initiators
> exposed in sysfs could be wrong: On dual-socket CLX with SNC enabled
> (4 nodes, 1 and 2 swapped between PXMs and nids), node1 would only
> get node2 as initiator, and node2 would only get node1.
>
> With this patch, we get node1 as the only initiator of itself,
> and node2 as the only initiator of itself, as expected.
>
> This should likely go to stable up to 5.2.
>
> Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
>
> diff --git a/drivers/acpi/hmat/hmat.c b/drivers/acpi/hmat/hmat.c
> index 8f9a28a870b0..3ca3c7c97ee0 100644
> --- a/drivers/acpi/hmat/hmat.c
> +++ b/drivers/acpi/hmat/hmat.c
> @@ -417,7 +417,7 @@ static int __init hmat_parse_proximity_domain(union acpi_subtable_headers *heade
>  			pr_debug("HMAT: Invalid Processor Domain\n");
>  			return -EINVAL;
>  		}
> -		target->processor_pxm = p_node;
> +		target->processor_pxm = p->processor_PD;
>  	}
>  
>  	return 0;
>

Can we have somebody please review this patch? I didn't get any reply
from Keith since I first sent it to him in early September unfortunately.

Without this patch, memory initiators are exposed wrong on our Dell  R740.

Thanks

Brice



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

* Re: acpi/hmat: don't mix pxm and nid when setting memory target processor_pxm
  2019-11-29 12:54 ` Brice Goglin
@ 2019-12-09 12:28   ` Rafael J. Wysocki
  0 siblings, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2019-12-09 12:28 UTC (permalink / raw)
  To: Brice Goglin; +Cc: linux-acpi, Keith Busch, Rafael Wysocki, LKML

On Friday, November 29, 2019 1:54:44 PM CET Brice Goglin wrote:
> Le 28/10/2019 à 10:11, Brice Goglin a écrit :
> > On systems where PXMs and nids are in different order, memory initiators
> > exposed in sysfs could be wrong: On dual-socket CLX with SNC enabled
> > (4 nodes, 1 and 2 swapped between PXMs and nids), node1 would only
> > get node2 as initiator, and node2 would only get node1.
> >
> > With this patch, we get node1 as the only initiator of itself,
> > and node2 as the only initiator of itself, as expected.
> >
> > This should likely go to stable up to 5.2.
> >
> > Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
> >
> > diff --git a/drivers/acpi/hmat/hmat.c b/drivers/acpi/hmat/hmat.c
> > index 8f9a28a870b0..3ca3c7c97ee0 100644
> > --- a/drivers/acpi/hmat/hmat.c
> > +++ b/drivers/acpi/hmat/hmat.c
> > @@ -417,7 +417,7 @@ static int __init hmat_parse_proximity_domain(union acpi_subtable_headers *heade
> >  			pr_debug("HMAT: Invalid Processor Domain\n");
> >  			return -EINVAL;
> >  		}
> > -		target->processor_pxm = p_node;
> > +		target->processor_pxm = p->processor_PD;
> >  	}
> >  
> >  	return 0;
> >
> 
> Can we have somebody please review this patch? I didn't get any reply
> from Keith since I first sent it to him in early September unfortunately.
> 
> Without this patch, memory initiators are exposed wrong on our Dell  R740.

See commit 4caa525b783b ("ACPI: HMAT: don't mix pxm and nid when setting memory
target processor_pxm") in 5.5-rc1.

Thanks!





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

end of thread, other threads:[~2019-12-09 12:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-28  9:11 acpi/hmat: don't mix pxm and nid when setting memory target processor_pxm Brice Goglin
2019-11-29 12:54 ` Brice Goglin
2019-12-09 12:28   ` Rafael J. Wysocki

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).