qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Bharata B Rao <bharata@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: mdroth@linux.vnet.ibm.com, agraf@suse.de, qemu-ppc@nongnu.org,
	Bharata B Rao <bharata@linux.vnet.ibm.com>,
	nfont@linux.vnet.ibm.com, david@gibson.dropbear.id.au
Subject: [Qemu-devel] [RFC PATCH v0 5/5] spapr: Move memory hotplug to RTAS_LOG_V6_HP_ID_DRC_COUNT type
Date: Mon,  3 Aug 2015 11:05:43 +0530	[thread overview]
Message-ID: <1438580143-587-6-git-send-email-bharata@linux.vnet.ibm.com> (raw)
In-Reply-To: <1438580143-587-1-git-send-email-bharata@linux.vnet.ibm.com>

Till now memory hotplug used RTAS_LOG_V6_HP_ID_DRC_INDEX hotplug type
which meant that we generated one hotplug type of EPOW event for every
256MB (SPAPR_MEMORY_BLOCK_SIZE). This quickly overruns the kernel
rtas log buffer thus resulting in loss of memory hotplug events. Switch
to RTAS_LOG_V6_HP_ID_DRC_COUNT hotplug type for memory so that we
generate only one event per hotplug request.

Signed-off-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 hw/ppc/spapr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 13af9be..2426345 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -2072,9 +2072,9 @@ static void spapr_add_lmbs(DeviceState *dev, uint64_t addr, uint64_t size,
 
         drck = SPAPR_DR_CONNECTOR_GET_CLASS(drc);
         drck->attach(drc, dev, fdt, fdt_offset, !dev->hotplugged, errp);
-        spapr_hotplug_req_add_by_index(drc);
         addr += SPAPR_MEMORY_BLOCK_SIZE;
     }
+    spapr_hotplug_req_add_by_count(SPAPR_DR_CONNECTOR_TYPE_LMB, nr_lmbs);
 }
 
 static void spapr_memory_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
-- 
2.1.0

  parent reply	other threads:[~2015-08-03  5:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-03  5:35 [Qemu-devel] [RFC PATCH v0 0/5] spapr-next: Memory hotplug updates Bharata B Rao
2015-08-03  5:35 ` [Qemu-devel] [RFC PATCH v0 1/5] spapr: Provide better error message when slots exceed max allowed Bharata B Rao
2015-08-03  6:43   ` David Gibson
2015-08-03  5:35 ` [Qemu-devel] [RFC PATCH v0 2/5] spapr: Populate ibm, associativity-lookup-arrays correctly for non-NUMA Bharata B Rao
2015-08-03  5:35 ` [Qemu-devel] [RFC PATCH v0 3/5] spapr: Revert to memory@XXXX representation for non-hotplugged memory Bharata B Rao
2015-08-04 14:33   ` Nathan Fontenot
2015-08-05  3:42     ` Bharata B Rao
2015-08-03  5:35 ` [Qemu-devel] [RFC PATCH v0 4/5] spapr: Support hotplug by specifying DRC count Bharata B Rao
2015-08-03  6:55   ` David Gibson
2015-08-03  7:53     ` Bharata B Rao
2015-08-03 22:32       ` Michael Roth
2015-08-04  4:36         ` David Gibson
2015-08-03  5:35 ` Bharata B Rao [this message]
2015-08-12  1:32 ` [Qemu-devel] [RFC PATCH v0 0/5] spapr-next: Memory hotplug updates David Gibson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1438580143-587-6-git-send-email-bharata@linux.vnet.ibm.com \
    --to=bharata@linux.vnet.ibm.com \
    --cc=agraf@suse.de \
    --cc=david@gibson.dropbear.id.au \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=nfont@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).