Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp3829435ima; Tue, 23 Oct 2018 11:58:58 -0700 (PDT) X-Google-Smtp-Source: AJdET5cDhYWtTtxDuluBBY5z91+FQCx1+jbUALgW22y8USXIgulSbNgWPwBXV/PaNxi31f1RcPI4 X-Received: by 2002:a17:902:5066:: with SMTP id f35-v6mr5893629plh.145.1540321138582; Tue, 23 Oct 2018 11:58:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540321138; cv=none; d=google.com; s=arc-20160816; b=S9zQ36SxNk0oMGjeRRHL4DKfIQVxpkQC/apytjsC402TDxYCUKwsDXtT0m7xRYh34E VhzFARQKlFeKrjzNpx4PHTVfk0P1jb3Te61weqnjE13y0ukVW25vwqdCYR+c90cBElOq /6y9iytddWUCYCehzqcRH5SvemNddbqIyPOSi6w7FMX936V+m4TUZMfZEqzmOurLj4WD jN6c9fghZdDlzeGSuXnY2iUu0yXhUdc0cbliqYg5lZ5s1A5hLxpSl8QkfW1GNz818kSH 9ty54d1iibTYuqmspB3Sw7wgBgrGGNr8j/KcogpTMo5XkWejFqGDNMKd6jpaWhVaJuy8 twPQ== 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:dkim-signature; bh=G1SBoNgBzY4auKZHsX217UML/qh3ROWdL83mSub6KBs=; b=OlDR40bBNrs2vjad5V2FtgBdfAnLyUJipz/t1/8f+JH141zrmRCmjD55AF4SrvOuhK 2We4fdq/6OdIwlgLQIwjuUV/BsylzWLic2XcD9IbD0bzzJYnqDgMdH5SlX5z6487miqk u8od7PlmySXjTO803YK3mtzmOJKCsNGG1gOnbXC6hVLhQJZDXM2Y2AvqweTl1H/uAXq9 mQ48EoIaPhvG/4QSvBCYaPcFVtHFpdvlU7CkOiDrg4weaAbzqNrWIh+cmty0uRfYfJZx jeiAC1gUnNA8QN9vw/Z87ZQRGqxmVQj2cuoR9MItzoB3hskhDQbUbwzrPywDKGFoEjcy DjkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=w4Je8Wyw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p4-v6si1898132plk.263.2018.10.23.11.58.42; Tue, 23 Oct 2018 11:58:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=w4Je8Wyw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728857AbeJXDW5 (ORCPT + 99 others); Tue, 23 Oct 2018 23:22:57 -0400 Received: from mail-oi1-f194.google.com ([209.85.167.194]:36106 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728282AbeJXDW4 (ORCPT ); Tue, 23 Oct 2018 23:22:56 -0400 Received: by mail-oi1-f194.google.com with SMTP id p125-v6so2034284oic.3 for ; Tue, 23 Oct 2018 11:58:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=G1SBoNgBzY4auKZHsX217UML/qh3ROWdL83mSub6KBs=; b=w4Je8WywGMloSfxug1LunK79CUiSStlnUcyg10ShXQcF+qxCMXp+gXA/H3KvXf+JPx XzkXIOWjFN0c+WfEvEaDHpEjPChdGSlU5hUilQtk9lXNMN+WGA9KQVXnCPRNgH0rELxJ gnARnrfanRS0KXks9xtkdZfk291zgXh+QbICGYWZRCrldymJ1XD9IP5tRiWAN5JAc4A6 rVkQGd15AIHp9JRm1t84uXOvb95e2eLawHxQaM0H8gDlzb+amVUYJMVshkOkcY4TQZyO 6eYculjNp8fkn0yvvFjdbtBAZxi7bxr1vg0U1AkVtajcy8ZgEaSTB7timRrqhilLxOrF W5oA== 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=G1SBoNgBzY4auKZHsX217UML/qh3ROWdL83mSub6KBs=; b=hNJElYM93T+pYR2zHIfXg3FUC+ReqAu2cgSiN5BbjewqomOnilbCougQXjuRBGa0xk R1NlQVtIZqer48Xu9oWlP9e0YFSuGtwujKRIPYG1dY8M3t81qBBX1vU9aNyu2n0SJl3n XqaS5tq+vYRNOqRbezFGYPFoP3NEhYYLXNB91+nWWMB1/8wB3HEm+RoMBpGBsLLKc48b Bxhnet/UGN9sNnJ3JyOrSEqdZcFIbBseMgA8UqVP5cd75D8u5GsN0icq0GhkEKZ/0P3I N0zMz4JoiqSLaCtN49PPrQ+0tiu9qleQcaxlSBz8aAL32EmybEn0TnXF4A/8Bohotk6K zK6g== X-Gm-Message-State: ABuFfogtTaLwIU2qRGb1z0Dv/CDdIBtaBF36B+ixh/201J4W1EDOmUFy qJojYIwkZGHIFlaTAUiIuZxoJGYDR4kaibNJwQh5MA== X-Received: by 2002:aca:44d7:: with SMTP id r206-v6mr25971312oia.280.1540321097521; Tue, 23 Oct 2018 11:58:17 -0700 (PDT) MIME-Version: 1.0 References: <20181022201317.8558C1D8@viggo.jf.intel.com> <2677a7f9-5dc8-7590-2b8b-a67da1cb6b92@intel.com> In-Reply-To: <2677a7f9-5dc8-7590-2b8b-a67da1cb6b92@intel.com> From: Dan Williams Date: Tue, 23 Oct 2018 11:58:06 -0700 Message-ID: Subject: Re: [PATCH 0/9] Allow persistent memory to be used like normal RAM To: Dave Hansen Cc: "Elliott, Robert (Persistent Memory)" , Dave Hansen , Tom Lendacky , Michal Hocko , linux-nvdimm , "Huang, Ying" , Linux Kernel Mailing List , Linux MM , zwisler@kernel.org, Andrew Morton , Fengguang Wu 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 Tue, Oct 23, 2018 at 11:17 AM Dave Hansen wrote: > > >> This series adds a new "driver" to which pmem devices can be > >> attached. Once attached, the memory "owned" by the device is > >> hot-added to the kernel and managed like any other memory. On > > > > Would this memory be considered volatile (with the driver initializing > > it to zeros), or persistent (contents are presented unchanged, > > applications may guarantee persistence by using cache flush > > instructions, fence instructions, and writing to flush hint addresses > > per the persistent memory programming model)? > > Volatile. > > >> I expect udev can automate this by setting up a rule to watch for > >> device-dax instances by UUID and call a script to do the detach / > >> reattach dance. > > > > Where would that rule be stored? Storing it on another device > > is problematic. If that rule is lost, it could confuse other > > drivers trying to grab device DAX devices for use as persistent > > memory. > > Well, we do lots of things like stable device naming from udev scripts. > We depend on them not being lost. At least this "fails safe" so we'll > default to persistence instead of defaulting to "eat your data". > Right, and at least for the persistent memory to volatile conversion case we will have the UUID to positively identify the DAX device. So it will indeed "fail safe" and just become a dax_pmem device again if the configuration is lost. We'll likely need to create/use a "by-path" scheme for non-pmem use cases.