qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Greg Kurz <groug@kaod.org>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH v2 0/5] spapr: Fix and cleanups for sPAPR CPU core
Date: Thu, 22 Oct 2020 15:02:36 +1100	[thread overview]
Message-ID: <20201022040236.GC1821515@yekko.fritz.box> (raw)
In-Reply-To: <160279669833.1808373.9524145092720289601.stgit@bahia.lan>

[-- Attachment #1: Type: text/plain, Size: 1478 bytes --]

On Thu, Oct 15, 2020 at 11:18:18PM +0200, Greg Kurz wrote:
> While reading the code _again_ I spotted a memory leak and I realized
> that the realize/unrealize paths are uselessly complex and not really
> symmetrical.
> 
> This series fixes the leak and re-shuffles the code to make it cleaner.
> 
> Tested with 'make check', travis-ci and manual hotplug/unplug of CPU
> cores. Also tested error paths by simulating failures when creating
> interrupt presenters or when setting the vCPU id.
> 
> v2: - enforce symmetry between realize and unrealize
>     - unrealize vCPUs with qdev_unrealize()
>     - one loop to create/realize and to unrealize/delete vCPUs

Applied to ppc-for-5.2.

> 
> ---
> 
> Greg Kurz (5):
>       spapr: Fix leak of CPU machine specific data
>       spapr: Unrealize vCPUs with qdev_unrealize()
>       spapr: Drop spapr_delete_vcpu() unused argument
>       spapr: Make spapr_cpu_core_unrealize() idempotent
>       spapr: Simplify spapr_cpu_core_realize() and spapr_cpu_core_unrealize()
> 
> 
>  accel/tcg/user-exec-stub.c      |    4 ++
>  hw/ppc/spapr_cpu_core.c         |   69 ++++++++++++++++++---------------------
>  target/ppc/translate_init.c.inc |    2 +
>  3 files changed, 37 insertions(+), 38 deletions(-)
> 

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      parent reply	other threads:[~2020-10-22  4:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-15 21:18 [PATCH v2 0/5] spapr: Fix and cleanups for sPAPR CPU core Greg Kurz
2020-10-15 21:18 ` [PATCH v2 1/5] spapr: Fix leak of CPU machine specific data Greg Kurz
2020-10-15 21:18 ` [PATCH v2 2/5] spapr: Unrealize vCPUs with qdev_unrealize() Greg Kurz
2020-10-15 21:18 ` [PATCH v2 3/5] spapr: Drop spapr_delete_vcpu() unused argument Greg Kurz
2020-10-15 21:18 ` [PATCH v2 4/5] spapr: Make spapr_cpu_core_unrealize() idempotent Greg Kurz
2020-10-15 21:18 ` [PATCH v2 5/5] spapr: Simplify spapr_cpu_core_realize() and spapr_cpu_core_unrealize() Greg Kurz
2020-10-22  4:02 ` David Gibson [this message]

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=20201022040236.GC1821515@yekko.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=groug@kaod.org \
    --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).