All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bharata B Rao <bharata@linux.vnet.ibm.com>
To: Igor Mammedov <imammedo@redhat.com>
Cc: qemu-devel@nongnu.org, David Gibson <david@gibson.dropbear.id.au>,
	Alexander Graf <agraf@suse.de>,
	qemu-ppc@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 3/3] spapr: make cpu core unplug follow expected hotunplug call flow
Date: Fri, 3 Feb 2017 12:37:06 +0530	[thread overview]
Message-ID: <20170203070706.GC12744@in.ibm.com> (raw)
In-Reply-To: <1486047755-93584-4-git-send-email-imammedo@redhat.com>

On Thu, Feb 02, 2017 at 04:02:35PM +0100, Igor Mammedov wrote:
> spapr_core_unplug() were essentially spapr_core_unplug_request()
> handler that requested CPU removal and registered callback
> which did actual cpu core removali but it was called from
> spapr_machine_device_unplug() which is intended for actual object
> removal. Commit (cf632463 spapr: Memory hot-unplug support)
> sort of fixed it introducing spapr_machine_device_unplug_request()
> and calling spapr_core_unplug() but it hasn't renamed callback and
> by mistake calls it from spapr_machine_device_unplug().
> 
> However spapr_machine_device_unplug() isn't ever called for
> cpu core since spapr_core_release() doesn't follow expected
> hotunplug call flow which is:
>  1: device_del() ->
>         hotplug_handler_unplug_request() ->
>             set destroy_cb()
>  2: destroy_cb() ->
>         hotplug_handler_unplug() ->
>             object_unparent // actual device removal
> 
> Fix it by renaming spapr_core_unplug() to spapr_core_unplug_request()
> which is called from spapr_machine_device_unplug_request() and
> making spapr_core_release() call hotplug_handler_unplug() which
> will call spapr_machine_device_unplug() -> spapr_core_unplug()
> to remove cpu core.
> 
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> ---
>  hw/ppc/spapr.c | 18 ++++++++++++++----

Reveiwed-by: Bharata B Rao <bharata@linux.vnet.ibm.com>

Regards,
Bharata.

  reply	other threads:[~2017-02-03  7:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-02 15:02 [Qemu-devel] [PATCH 0/3] spapr: fix cpu core hotunplug call flow Igor Mammedov
2017-02-02 15:02 ` [Qemu-devel] [PATCH 1/3] spapr: cpu core: separate child threads destruction from machine state operations Igor Mammedov
2017-02-03  7:04   ` Bharata B Rao
2017-02-03 10:51     ` [Qemu-devel] [PATCH v2 " Igor Mammedov
2017-02-02 15:02 ` [Qemu-devel] [PATCH 2/3] spapr: move spapr_core_[foo]plug() callbacks close to machine code in spapr.c Igor Mammedov
2017-02-02 15:02 ` [Qemu-devel] [PATCH 3/3] spapr: make cpu core unplug follow expected hotunplug call flow Igor Mammedov
2017-02-03  7:07   ` Bharata B Rao [this message]
2017-02-05 23:46 ` [Qemu-devel] [PATCH 0/3] spapr: fix cpu core " 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=20170203070706.GC12744@in.ibm.com \
    --to=bharata@linux.vnet.ibm.com \
    --cc=agraf@suse.de \
    --cc=david@gibson.dropbear.id.au \
    --cc=imammedo@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.