From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7CA18C433E0 for ; Fri, 31 Jul 2020 14:25:26 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4B8BD21744 for ; Fri, 31 Jul 2020 14:25:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4B8BD21744 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id D9B546B0010; Fri, 31 Jul 2020 10:25:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D250A6B0023; Fri, 31 Jul 2020 10:25:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BED616B0027; Fri, 31 Jul 2020 10:25:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0213.hostedemail.com [216.40.44.213]) by kanga.kvack.org (Postfix) with ESMTP id A501A6B0010 for ; Fri, 31 Jul 2020 10:25:25 -0400 (EDT) Received: from smtpin08.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 4CEF5824805A for ; Fri, 31 Jul 2020 14:25:25 +0000 (UTC) X-FDA: 77098593810.08.spade51_2a0962e26f84 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin08.hostedemail.com (Postfix) with ESMTP id 22EA81819E766 for ; Fri, 31 Jul 2020 14:25:25 +0000 (UTC) X-HE-Tag: spade51_2a0962e26f84 X-Filterd-Recvd-Size: 5346 Received: from mail-oi1-f193.google.com (mail-oi1-f193.google.com [209.85.167.193]) by imf20.hostedemail.com (Postfix) with ESMTP for ; Fri, 31 Jul 2020 14:25:24 +0000 (UTC) Received: by mail-oi1-f193.google.com with SMTP id j7so10461489oij.9 for ; Fri, 31 Jul 2020 07:25:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LUq1ijDD9SyO2ufTXKPW9//vrm+uL0JQvV8OQ7tDtyA=; b=ShR+Gv+6YLUJ7jKTLM/YXtN7ZFydEIA/2BCieVAmcQOxq2G3fBMGWrhnDOIQkI45Qe c5EDUnbkpTi0h5CUPeJYcEV/o4MstbC9iDu78V2DgybWaYHgIakddKWwYkoXJ1nSoCB5 yQD5eAWLJ5xMrM0cQDgkGiDoRlLdE6/lnpXUebVehKs2t/tp/Eawr/Dw6MxUaLZ8cBAw JWoscOqcjAz15CBdlChGOjUR98CGWubJ61L0rg8zPUdFynjOkDowx+pPatmRmJEjOJh4 qtMjCl77OO0LIhWAF54hSNWWwqwhuLtFeyJh3LbTr2ieuqldBYdCU1/r3I2EAEv0QAnH glQA== X-Gm-Message-State: AOAM533UdpoNfpDQVjuATDGalVY8JFCrvL2GQ+1n+8EkqUQxoUw8kOjZ geM4zP9llAAYpP5vW0l5kY2beEbV50p6fWMt/VM= X-Google-Smtp-Source: ABdhPJwXQdnG1otKOfzVxyL9Pv5KPx5Dv3MAzyWKLAJcQfKXU/RGMyj9PAedIsxXvXnE+QB4qD60adxhPMBESDi6fDY= X-Received: by 2002:aca:a88e:: with SMTP id r136mr3259373oie.110.1596205523967; Fri, 31 Jul 2020 07:25:23 -0700 (PDT) MIME-Version: 1.0 References: <20200717191009.GA3387@dev-dsk-anchalag-2a-9c2d1d96.us-west-2.amazon.com> <5464f384-d4b4-73f0-d39e-60ba9800d804@oracle.com> <20200721000348.GA19610@dev-dsk-anchalag-2a-9c2d1d96.us-west-2.amazon.com> <408d3ce9-2510-2950-d28d-fdfe8ee41a54@oracle.com> <20200722180229.GA32316@dev-dsk-anchalag-2a-9c2d1d96.us-west-2.amazon.com> <20200723225745.GB32316@dev-dsk-anchalag-2a-9c2d1d96.us-west-2.amazon.com> <66a9b838-70ed-0807-9260-f2c31343a081@oracle.com> <20200730230634.GA17221@dev-dsk-anchalag-2a-9c2d1d96.us-west-2.amazon.com> <53b577a3-6af9-5587-7e47-485be38b3653@oracle.com> In-Reply-To: <53b577a3-6af9-5587-7e47-485be38b3653@oracle.com> From: "Rafael J. Wysocki" Date: Fri, 31 Jul 2020 16:25:12 +0200 Message-ID: Subject: Re: [PATCH v2 01/11] xen/manage: keep track of the on-going suspend mode To: Boris Ostrovsky Cc: Anchal Agarwal , Stefano Stabellini , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , "the arch/x86 maintainers" , Juergen Gross , Linux PM , Linux Memory Management List , "Kamata, Munehisa" , Konrad Rzeszutek Wilk , roger.pau@citrix.com, Jens Axboe , David Miller , "Rafael J. Wysocki" , Len Brown , Pavel Machek , Peter Zijlstra , Eduardo Valentin , "Singh, Balbir" , xen-devel@lists.xenproject.org, Vitaly Kuznetsov , netdev , Linux Kernel Mailing List , David Woodhouse , Benjamin Herrenschmidt Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 22EA81819E766 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Jul 31, 2020 at 4:14 PM Boris Ostrovsky wrote: > > On 7/30/20 7:06 PM, Anchal Agarwal wrote: > > On Mon, Jul 27, 2020 at 06:08:29PM -0400, Boris Ostrovsky wrote: > >> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe. > >> > >> > >> > >> On 7/24/20 7:01 PM, Stefano Stabellini wrote: > >>> Yes, it does, thank you. I'd rather not introduce unknown regressions so > >>> I would recommend to add an arch-specific check on registering > >>> freeze/thaw/restore handlers. Maybe something like the following: > >>> > >>> #ifdef CONFIG_X86 > >>> .freeze = blkfront_freeze, > >>> .thaw = blkfront_restore, > >>> .restore = blkfront_restore > >>> #endif > >>> > >>> > >>> maybe Boris has a better suggestion on how to do it > >> > >> An alternative might be to still install pm notifier in > >> drivers/xen/manage.c (I think as result of latest discussions we decided > >> we won't need it) and return -ENOTSUPP for ARM for > >> PM_HIBERNATION_PREPARE and friends. Would that work? > >> > > I think the question here is for registering driver specific freeze/thaw/restore > > callbacks for x86 only. I have dropped the pm_notifier in the v3 still pending > > testing. So I think just registering driver specific callbacks for x86 only is a > > good option. What do you think? > > > I suggested using the notifier under assumption that if it returns an > error then that will prevent callbacks to be called because hibernation > will be effectively disabled. That's correct.