Skip to contentSkip to conversation

powerpc/pseries: Provide verbose info about HPT resizing attempt

PATCH In review Bharata B Rao 2 participants 3 messages Apr 10, 2019 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/pseries: Provide verbose info about HPT resizing attempt

When HPT resizing is attempted in response to memory hotplug, we see the following messages from the kernel:

lpar: Attempting to resize HPT to shift 23 Unable to resize hash page table to target order 23: -28

This gives a feeling as though we are trying to grow HPT but failed and hence bad things might happen in future. Improve the message a bit by explicitly printing the existing HPT shift value in addtion to the newly targeted value so that it is clear that we haven't failed to grow HPT. After this commit, the same message will appear like this:

lpar: Attempting to resize HPT from shift 25 to 23 Unable to resize hash page table to target order 23: -28

---
 arch/powerpc/platforms/pseries/lpar.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/powerpc/platforms/pseries/lpar.c +2 -1
index f2a9f0adc2d3..ecc7fa1876a9 100644
@@ -875,7 +875,8 @@ static int pseries_lpar_resize_hpt(unsigned long shift)
 	if (!firmware_has_feature(FW_FEATURE_HPT_RESIZE))
 		return -ENODEV;
 
-	pr_info("Attempting to resize HPT to shift %lu\n", shift);
+	pr_info("Attempting to resize HPT from shift %llu to %lu\n", ppc64_pft_size,
+		shift);
 
 	t0 = ktime_get();
 
Signature · 1 line
2.17.1
#1 lore raw
Quoted 12 lines · Bharata B Rao

When HPT resizing is attempted in response to memory hotplug, we see the following messages from the kernel:

lpar: Attempting to resize HPT to shift 23 Unable to resize hash page table to target order 23: -28

This gives a feeling as though we are trying to grow HPT but failed and hence bad things might happen in future. Improve the message a bit by explicitly printing the existing HPT shift value in addtion to the newly targeted value so that it is clear that we haven't failed to grow HPT. After this commit, the same message will appear like this:

Quoted 4 lines

lpar: Attempting to resize HPT from shift 25 to 23 Unable to resize hash page table to target order 23: -28

I'd be inclined to just remove the "Attempting .." message.

But I have this patch from Laurent queued, which already reworks things:

https://patchwork.ozlabs.org/patch/1055996/

Does that address your problem?

cheers

Quoted 16 lines
arch/powerpc/platforms/pseries/lpar.c +2 -1
index f2a9f0adc2d3..ecc7fa1876a9 100644
@@ -875,7 +875,8 @@ static int pseries_lpar_resize_hpt(unsigned long shift)
 	if (!firmware_has_feature(FW_FEATURE_HPT_RESIZE))
 		return -ENODEV;
 
-	pr_info("Attempting to resize HPT to shift %lu\n", shift);
+	pr_info("Attempting to resize HPT from shift %llu to %lu\n", ppc64_pft_size,
+		shift);
 
 	t0 = ktime_get();
 
Signature · 1 line
2.17.1
#2 lore raw
Quoted 19 lines · Michael Ellerman
Quoted 12 lines · Bharata B Rao

When HPT resizing is attempted in response to memory hotplug, we see the following messages from the kernel:

lpar: Attempting to resize HPT to shift 23 Unable to resize hash page table to target order 23: -28

This gives a feeling as though we are trying to grow HPT but failed and hence bad things might happen in future. Improve the message a bit by explicitly printing the existing HPT shift value in addtion to the newly targeted value so that it is clear that we haven't failed to grow HPT. After this commit, the same message will appear like this:

Quoted 4 lines

lpar: Attempting to resize HPT from shift 25 to 23 Unable to resize hash page table to target order 23: -28

Quoted 8 lines

I'd be inclined to just remove the "Attempting .." message.

But I have this patch from Laurent queued, which already reworks things:

https://patchwork.ozlabs.org/patch/1055996/

Does that address your problem?

Yes, I should have seen this earlier.

Regards,
Bharata.