All of lore.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will.deacon@arm.com>
To: Ross Zwisler <ross.zwisler@linux.intel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	"Luis R. Rodriguez" <mcgrof@suse.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Andrew Morton <akpm@linux-foundation.org>,
	Borislav Petkov <bp@suse.de>, Christoph Hellwig <hch@lst.de>,
	Christoph Jaeger <cj@linux.com>,
	Dan Streetman <ddstreet@ieee.org>,
	Dan Williams <dan.j.williams@intel.com>,
	Ingo Molnar <mingo@redhat.com>, Juergen Gross <jgross@suse.com>,
	Len Brown <lenb@kernel.org>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Thierry Reding <treding@nvidia.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Toshi Kani <toshi.kani@hp.com>,
	Vishal Verma <vishal.l.verma@intel.com>,
	Yalin Wang <Yalin.Wang@sonymobile.com>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	"linux-nvdimm@ml01.01.org" <linux-nvdimm@ml01.01.org>,
	x86@kern
Subject: Re: [PATCH v2] nd_blk: add support for "read flush" DSM flag
Date: Thu, 20 Aug 2015 11:21:47 +0100	[thread overview]
Message-ID: <20150820102147.GB19328@arm.com> (raw)
In-Reply-To: <1440024484-26152-1-git-send-email-ross.zwisler@linux.intel.com>

On Wed, Aug 19, 2015 at 11:48:04PM +0100, Ross Zwisler wrote:
> Add support for the "read flush" _DSM flag, as outlined in the DSM spec:
> 
> http://pmem.io/documents/NVDIMM_DSM_Interface_Example.pdf
> 
> This flag tells the ND BLK driver that it needs to flush the cache lines
> associated with the aperture after the aperture is moved but before any
> new data is read.  This ensures that any stale cache lines from the
> previous contents of the aperture will be discarded from the processor
> cache, and the new data will be read properly from the DIMM.  We know
> that the cache lines are clean and will be discarded without any
> writeback because either a) the previous aperture operation was a read,
> and we never modified the contents of the aperture, or b) the previous
> aperture operation was a write and we must have written back the dirtied
> contents of the aperture to the DIMM before the I/O was completed.

Is this operation expected to be implemented as a destructive invalidation
(i.e. discarding any dirty lines from the cache) or also a writeback of any
dirtylines as part of the invalidation?

If its the former, we might want to give it a scarier name to ensure that
it doesn't grow users outside of NVDIMM scenarios, since "flush" is used
elsewhere for things like flush_dcache_page.

Will

WARNING: multiple messages have this Message-ID (diff)
From: Will Deacon <will.deacon@arm.com>
To: Ross Zwisler <ross.zwisler@linux.intel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	"Luis R. Rodriguez" <mcgrof@suse.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Andrew Morton <akpm@linux-foundation.org>,
	Borislav Petkov <bp@suse.de>, Christoph Hellwig <hch@lst.de>,
	Christoph Jaeger <cj@linux.com>,
	Dan Streetman <ddstreet@ieee.org>,
	Dan Williams <dan.j.williams@intel.com>,
	Ingo Molnar <mingo@redhat.com>, Juergen Gross <jgross@suse.com>,
	Len Brown <lenb@kernel.org>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Thierry Reding <treding@nvidia.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Toshi Kani <toshi.kani@hp.com>,
	Vishal Verma <vishal.l.verma@intel.com>,
	Yalin Wang <Yalin.Wang@sonymobile.com>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
	"linux-nvdimm@ml01.01.org" <linux-nvdimm@ml01.01.org>,
	"x86@kernel.org" <x86@kernel.org>
Subject: Re: [PATCH v2] nd_blk: add support for "read flush" DSM flag
Date: Thu, 20 Aug 2015 11:21:47 +0100	[thread overview]
Message-ID: <20150820102147.GB19328@arm.com> (raw)
In-Reply-To: <1440024484-26152-1-git-send-email-ross.zwisler@linux.intel.com>

On Wed, Aug 19, 2015 at 11:48:04PM +0100, Ross Zwisler wrote:
> Add support for the "read flush" _DSM flag, as outlined in the DSM spec:
> 
> http://pmem.io/documents/NVDIMM_DSM_Interface_Example.pdf
> 
> This flag tells the ND BLK driver that it needs to flush the cache lines
> associated with the aperture after the aperture is moved but before any
> new data is read.  This ensures that any stale cache lines from the
> previous contents of the aperture will be discarded from the processor
> cache, and the new data will be read properly from the DIMM.  We know
> that the cache lines are clean and will be discarded without any
> writeback because either a) the previous aperture operation was a read,
> and we never modified the contents of the aperture, or b) the previous
> aperture operation was a write and we must have written back the dirtied
> contents of the aperture to the DIMM before the I/O was completed.

Is this operation expected to be implemented as a destructive invalidation
(i.e. discarding any dirty lines from the cache) or also a writeback of any
dirtylines as part of the invalidation?

If its the former, we might want to give it a scarier name to ensure that
it doesn't grow users outside of NVDIMM scenarios, since "flush" is used
elsewhere for things like flush_dcache_page.

Will

  parent reply	other threads:[~2015-08-20 10:21 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-19 22:48 [PATCH v2] nd_blk: add support for "read flush" DSM flag Ross Zwisler
2015-08-19 22:48 ` Ross Zwisler
2015-08-19 23:06 ` Dan Williams
2015-08-19 23:06   ` Dan Williams
2015-08-20 16:44   ` Ross Zwisler
2015-08-20 16:44     ` Ross Zwisler
2015-08-20 17:59     ` Dan Williams
2015-08-20 17:59       ` Dan Williams
2015-08-20 18:17       ` Ross Zwisler
2015-08-20 18:17         ` Ross Zwisler
2015-08-20 18:26         ` Dan Williams
2015-08-20 18:26           ` Dan Williams
2015-08-20 19:00           ` Ross Zwisler
2015-08-20 19:00             ` Ross Zwisler
2015-08-20 20:27             ` Dan Williams
2015-08-20 20:27               ` Dan Williams
2015-08-20 21:15               ` Ross Zwisler
2015-08-20 21:15                 ` Ross Zwisler
2015-08-23  1:59                 ` Dan Williams
2015-08-23  1:59                   ` Dan Williams
2015-08-20 10:21 ` Will Deacon [this message]
2015-08-20 10:21   ` Will Deacon
2015-08-20 16:08   ` Ross Zwisler
2015-08-20 16:08     ` Ross Zwisler

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=20150820102147.GB19328@arm.com \
    --to=will.deacon@arm.com \
    --cc=Yalin.Wang@sonymobile.com \
    --cc=akpm@linux-foundation.org \
    --cc=bp@suse.de \
    --cc=cj@linux.com \
    --cc=dan.j.williams@intel.com \
    --cc=ddstreet@ieee.org \
    --cc=hch@lst.de \
    --cc=hpa@zytor.com \
    --cc=jgross@suse.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvdimm@ml01.01.org \
    --cc=mcgrof@suse.com \
    --cc=mingo@redhat.com \
    --cc=rjw@rjwysocki.net \
    --cc=ross.zwisler@linux.intel.com \
    --cc=rusty@rustcorp.com.au \
    --cc=sfr@canb.auug.org.au \
    --cc=tglx@linutronix.de \
    --cc=toshi.kani@hp.com \
    --cc=treding@nvidia.com \
    --cc=vishal.l.verma@intel.com \
    --cc=x86@kern \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.