linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/pseries: Don't attempt to acquire drc during memory hot add for assigned lmbs
@ 2017-08-23 17:18 John Allen
  2017-08-23 18:54 ` Nathan Fontenot
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: John Allen @ 2017-08-23 17:18 UTC (permalink / raw)
  To: linuxppc-dev, Nathan Fontenot

Check if an LMB is assigned before attempting to call dlpar_acquire_drc in
order to avoid any unnecessary rtas calls. This substantially reduces the
running time of memory hot add on lpars with large amounts of memory.

Signed-off-by: John Allen <jallen@linux.vnet.ibm.com>
---
diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/arch/powerpc/platforms/pseries/hotplug-memory.c
index ca9b2f4..95cf2ff 100644
--- a/arch/powerpc/platforms/pseries/hotplug-memory.c
+++ b/arch/powerpc/platforms/pseries/hotplug-memory.c
@@ -817,6 +817,9 @@ static int dlpar_memory_add_by_count(u32 lmbs_to_add, struct property *prop)
 		return -EINVAL;

 	for (i = 0; i < num_lmbs && lmbs_to_add != lmbs_added; i++) {
+		if (lmbs[i].flags & DRCONF_MEM_ASSIGNED)
+			continue;
+
 		rc = dlpar_acquire_drc(lmbs[i].drc_index);
 		if (rc)
 			continue;

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

end of thread, other threads:[~2017-09-01 13:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-23 17:18 [PATCH] powerpc/pseries: Don't attempt to acquire drc during memory hot add for assigned lmbs John Allen
2017-08-23 18:54 ` Nathan Fontenot
2017-08-24 10:33 ` Michael Ellerman
2017-08-24 14:46   ` John Allen
2017-08-30  2:35 ` Michael Ellerman
2017-08-30 14:35   ` Nathan Fontenot
2017-08-30 14:43     ` John Allen
2017-08-31 10:32       ` Michael Ellerman
2017-08-31 10:24     ` Michael Ellerman
2017-09-01 13:29 ` Michael Ellerman

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