Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1512492ybt; Thu, 9 Jul 2020 08:45:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZMBQneUVlh4+TPOCu2SLalfR0jK3nUPSyxLgB/vXzrpFWageKMIZSk2Tm4PwCJ6mGiv0U X-Received: by 2002:aa7:c657:: with SMTP id z23mr64587852edr.265.1594309510795; Thu, 09 Jul 2020 08:45:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594309510; cv=none; d=google.com; s=arc-20160816; b=XsZ+CulpDZMbv7D6BtWGhwoKNGgXxzWS3+4iBbn+GrevJP9Z9Q8J1fBQriRGuUONFJ xcaFyNvb+0Aiyj+TSQsgg26bxpeg8ZV9k7bedjuHsb1Gp+inwnPnXocMcq1lf8dtQyGq xjT2VvezA34qQr9rJj+0EJfDTUgTGOvgOvQQefsFexSeBEUtTpP3wzGWGMwg6xuPt9oX vwYKSS7+2jr9EJJ4JZNVRA6L4KQlaoxm8nzaJkpz6Q1FKEEKAcqlXbHvguiNTQEkO8fk sRHvBWyBonysTvMlBFmq3hQPJRvMxeDksO+QX0wVAXRMT0fnyXjftu6BWHe22UGZh6j6 O3eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=+Sym5KQVj8VqaMlSDW0Jc0j+Tk3pFvysmGFqfcg2Rvs=; b=nYA8V8PzvPtc9R6Jt1ApHCmPb/P7XK2vmNPMDQRO9kA57RELkz6jF1sGY8b3Vy4fnB OIBSvT9mZkxnU6QtaCnEVAwwQII7Vu8UFyA4Q9Vx2K6o18e85vof0cjHjHUx6Dn/2ID9 XNnaG9FrF416SlfPFrrtMWC96ruXAH7ngWU9b+4r1mVrpN+HRUgn/YVx0OuVgCgUFnm3 J+QHBt1fr0/PB9FgYeC+Quz5lC887KVGResgsig2wwV0sl+nKjtC3g2SJ1ir8gDs5RzZ fHKTGQDv3kwe5a+dEyf2mewtTAHQZhUdY+KCuMmvUA8JELS6oS28H16N92gqpWdsW4x0 Xgrw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g26si2334962edu.253.2020.07.09.08.44.46; Thu, 09 Jul 2020 08:45:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727925AbgGIPoE (ORCPT + 99 others); Thu, 9 Jul 2020 11:44:04 -0400 Received: from mail-ot1-f68.google.com ([209.85.210.68]:42384 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726339AbgGIPoE (ORCPT ); Thu, 9 Jul 2020 11:44:04 -0400 Received: by mail-ot1-f68.google.com with SMTP id g37so1994678otb.9; Thu, 09 Jul 2020 08:44:04 -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=+Sym5KQVj8VqaMlSDW0Jc0j+Tk3pFvysmGFqfcg2Rvs=; b=oWOn4R78xsxEibGz6deMujXww252NtLv0VBrjgaSpDo/xjC4TCDjgm2dcsNS3WCQ1P Zj/29agFt3vjOxviDPacHioHRYXNY7Qtqqj+HXR34htRBQm2Fkuv65LrvT5kAkHadOsl 1IF1IzIZInVRV2NgX8CJ4LWsFaNDVQgAcoDE26aK9NMbYQST+dohQQR+SFHkpixwzKJt //I/U2F+pFa8L6zgwsBsXy+4uKAlOwcG7hj8oSGEDnjb1Z6AxQ9GSYJbdz5YdrviVb98 xk3yd3yvIUYJJncYUVH7tYA9rKyIog4Eu0T/i2o13EW01ApjtxIBQGRRPZtG2wYZiXmE 6tDA== X-Gm-Message-State: AOAM531pu32WD9yL7Uk3bxP5OdDZFHPTqt1/FNQwEg/hGNi9jliw6LH6 RDicyP266Y2MnyJFZ+5J8MHkzuE5V1hlvqGzlJI= X-Received: by 2002:a9d:1c82:: with SMTP id l2mr36010851ota.167.1594309443612; Thu, 09 Jul 2020 08:44:03 -0700 (PDT) MIME-Version: 1.0 References: <159408711335.2385045.2567600405906448375.stgit@dwillia2-desk3.amr.corp.intel.com> <159408717289.2385045.14094866475168644020.stgit@dwillia2-desk3.amr.corp.intel.com> <20200709150051.GA17342@infradead.org> <20200709153854.GY23821@mellanox.com> In-Reply-To: <20200709153854.GY23821@mellanox.com> From: "Rafael J. Wysocki" Date: Thu, 9 Jul 2020 17:43:52 +0200 Message-ID: Subject: Re: [PATCH v2 11/12] PM, libnvdimm: Add 'mem-quiet' state and callback for firmware activation To: Jason Gunthorpe Cc: Christoph Hellwig , Dan Williams , "linux-nvdimm@lists.01.org" , Greg Kroah-Hartman , "Rafael J. Wysocki" , Doug Ledford , Pavel Machek , Len Brown , ACPI Devel Maling List , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 9, 2020 at 5:39 PM Jason Gunthorpe wrote: > > On Thu, Jul 09, 2020 at 04:00:51PM +0100, Christoph Hellwig wrote: > > On Mon, Jul 06, 2020 at 06:59:32PM -0700, Dan Williams wrote: > > > The runtime firmware activation capability of Intel NVDIMM devices > > > requires memory transactions to be disabled for 100s of microseconds. > > > This timeout is large enough to cause in-flight DMA to fail and other > > > application detectable timeouts. Arrange for firmware activation to be > > > executed while the system is "quiesced", all processes and device-DMA > > > frozen. > > > > > > It is already required that invoking device ->freeze() callbacks is > > > sufficient to cease DMA. A device that continues memory writes outside > > > of user-direction violates expectations of the PM core to be to > > > establish a coherent hibernation image. > > > > > > That said, RDMA devices are an example of a device that access memory > > > outside of user process direction. > > Are you saying freeze doesn't work for some RDMA drivers? That would > be a driver bug, I think. > > The consequences of doing freeze are pretty serious, but it should > still stop DMA. Yes, it should. The "freeze" callbacks are expected to prevent any DMA transfers from being carried out after they have been executed. Thanks!