From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935782AbdCVR4S (ORCPT ); Wed, 22 Mar 2017 13:56:18 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:29545 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935714AbdCVR4L (ORCPT ); Wed, 22 Mar 2017 13:56:11 -0400 Subject: Re: [PATCH 2/2 v2] xen/acpi: upload PM state from init-domain to Xen To: Stanislaw Gruszka References: <1490136218-3857-1-git-send-email-ankur.a.arora@oracle.com> <1490136218-3857-3-git-send-email-ankur.a.arora@oracle.com> <20170322090541.GA2860@redhat.com> Cc: linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, stable@vger.kernel.org From: Ankur Arora Message-ID: Date: Wed, 22 Mar 2017 10:56:02 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170322090541.GA2860@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Source-IP: userv0021.oracle.com [156.151.31.71] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2017-03-22 02:05 AM, Stanislaw Gruszka wrote: > On Tue, Mar 21, 2017 at 03:43:38PM -0700, Ankur Arora wrote: >> This was broken in commit cd979883b9ede90643e019f33cb317933eb867b4. >> do_suspend (from xen/manage.c) and thus xen_resume_notifier never get >> called on the initial-domain at resume (it is if running as guest.) >> >> The rationale for the breaking change was that upload_pm_data() >> potentially does blocking work in syscore_resume(). This patch >> addresses the original issue by scheduling upload_pm_data() to >> execute in workqueue context. > > It is ok to do upload_pm_data() with delay i.e. after some other > resume actions are done and possibly xen-acpi-processor is in > running state ? The state uploaded is ACPI P and C state from struct acpi_processor which AFAICS is stable once inited so a delay would not lead to invalid state. The only concern would be the ACPI pCPU hotplug logic in acpi_processor_add() which could add a new entry in per_cpu(processors) but that also looks okay because either we get a NULL or we get a pointer to an inited structure. As for the hypervisor -- that falls back to more limited state after resume (because some of this state is thrown away at suspend) and so uses that until it gets the uploaded PM state from the initial-domain. Ankur > > Stanislaw >