public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vladislav Bolkhovitin <vst@vlnb.net>
To: rob.gittins@linux.intel.com
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@veger.org,
	linux-pmfs@lists.infradead.org
Subject: Re: RFC Block Layer Extensions to Support NV-DIMMs
Date: Fri, 06 Sep 2013 22:12:13 -0700	[thread overview]
Message-ID: <522AB5AD.6070206@vlnb.net> (raw)
In-Reply-To: <1378331689.9210.11.camel@Virt-Centos-6.lm.intel.com>


Rob Gittins, on 09/04/2013 02:54 PM wrote:
> Non-volatile DIMMs have started to become available.  A NVDIMMs is a
> DIMM that does not lose data across power interruptions.  Some of the
> NVDIMMs act like memory, while others are more like a block device
> on the memory bus. Application uses vary from being used to cache
> critical data, to being a boot device.
> 
> There are two access classes of NVDIMMs,  block mode and
> “load/store” mode DIMMs which are referred to as Direct Memory
> Mappable.
> 
> The block mode is where the DIMM provides IO ports for read or write
> of data.  These DIMMs reside on the memory bus but do not appear in the
> application address space.  Block mode DIMMs do not require any changes
> to the current infrastructure, since they provide IO type of interface.
> 
> Direct Memory Mappable DIMMs (DMMD) appear in the system address space
> and are accessed via load and store instructions.  These NVDIMMs
> are part of the system physical address space (SPA) as memory with
> the attribute that data survives a power interruption.  As such this
> memory is managed by the kernel which can  assign virtual addresses and
> mapped into application’s address space as well as being accessible
> by the kernel.  The area mapped into the system address space is
> being referred to as persistent memory (PMEM).
> 
> PMEM introduces the need for new operations in the
> block_device_operations to support the specific characteristics of
> the media.
> 
> First data may not propagate all the way through the memory pipeline
> when store instructions are executed.  Data may stay in the CPU cache
> or in other buffers in the processor and memory complex.  In order to
> ensure the durability of data there needs to be a driver entry point
> to force a byte range out to media.  The methods of doing this are
> specific to the PMEM technology and need to be handled by the driver
> that is supporting the DMMDs.  To provide a way to ensure that data is
> durable adding a commit function to the block_device_operations vector.
> 
>    void (*commitpmem)(struct block_device *bdev, void *addr);

Why to glue to the block concept for apparently not block class of devices? By pushing
NVDIMMs into the block model you both limiting them to block devices capabilities as
well as have to expand block devices by alien to them properties.

NVDIMMs are, apparently, a new class of devices, so better to have a new class of
kernel devices for them. If you then need to put file systems on top of them, just
write one-fit-all blk_nvmem driver, which can create a block device for all types of
NVDIMM devices and drivers.

This way you will clearly and gracefully get the best from NVDIMM devices as well as
won't soil block devices.

Vlad

  parent reply	other threads:[~2013-09-07  5:12 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-04 21:54 RFC Block Layer Extensions to Support NV-DIMMs Rob Gittins
2013-09-05 12:12 ` Jeff Moyer
2013-09-05 15:34   ` Matthew Wilcox
2013-09-05 17:15     ` Jeff Moyer
2013-09-05 17:57       ` Matthew Wilcox
2013-09-05 19:46       ` Zuckerman, Boris
2013-09-05 20:43         ` Gittins, Rob
2013-09-05 21:02           ` Zuckerman, Boris
2013-09-05 16:33   ` Rob Gittins
2013-09-05 17:19     ` Jeff Moyer
2013-09-07  5:12 ` Vladislav Bolkhovitin [this message]
2013-09-23 22:51   ` Rob Gittins
2013-09-26  6:58     ` Vladislav Bolkhovitin
2013-09-26 14:56       ` Zuckerman, Boris
2013-09-26 17:56         ` Matthew Wilcox
2013-09-26 19:36           ` Zuckerman, Boris
2013-09-28  7:44             ` Vladislav Bolkhovitin

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=522AB5AD.6070206@vlnb.net \
    --to=vst@vlnb.net \
    --cc=linux-fsdevel@veger.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pmfs@lists.infradead.org \
    --cc=rob.gittins@linux.intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox