From: Andy Lutomirski <luto@amacapital.net>
To: Howard Chu <hyc@symas.com>
Cc: Dave Chinner <david@fromorbit.com>,
Linux FS Devel <linux-fsdevel@vger.kernel.org>,
lsf-pc@lists.linux-foundation.org,
"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: [Lsf-pc] [LSF/MM TOPIC] [ATTEND] Persistent memory
Date: Thu, 23 Jan 2014 11:54:22 -0800 [thread overview]
Message-ID: <CALCETrU=WNbpoNyNFZOw94B=1y6ad=dASgAmOGLuKp5k2cdD4g@mail.gmail.com> (raw)
In-Reply-To: <52DF7D9B.20904@symas.com>
On Wed, Jan 22, 2014 at 12:13 AM, Howard Chu <hyc@symas.com> wrote:
> Dave Chinner wrote:
>>
>> On Tue, Jan 21, 2014 at 12:59:42PM -0800, Andy Lutomirski wrote:
>>>
>>> On Tue, Jan 21, 2014 at 12:36 PM, Dave Chinner <david@fromorbit.com>
>
>>> If we're using dm-crypt using an NV-DIMM "block" device as cache and a
>>> real disk as backing store, then ideally mmap would map the NV-DIMM
>>> directly if the data in question lives there.
>>
>>
>> dm-crypt does not use any block device as a cache. You're thinking
>> about dm-cache or bcache. And neither of them are operating at the
>> filesystem level or are aware of the difference between fileystem
>> metadata and user data.
>
>
> Why should that layer need to be aware? A page is a page, as far as they're
> concerned.
I think that, ideally, the awareness would go the other way.
dm-cache (where the backing store is a normal disk but the cache
storage is persistent memory) should not care what kind of page it's
caching. On the other hand, the filesystem sitting on top of dm-cache
should be able to tell when a page (in the device exposed by dm-cache)
is actually CPU-addressable so it can avoid allocating yet another
copy in pagecache. Similarly, it should be able to be notified when
that page is about to stop being cpu-addressable.
This might be an argument to have, in addition (or as a replacement
to) direct_access, XIP ops that ask for a reference to a page, are
permitted to fail (i.e. say "sorry, not CPU addressable right now),
and a way to be notified when a page is going away.
(This is totally unnecessary if using something like an NV-DIMM
directly -- it's only important for more complicated things like
dm-cache.)
>
>
>> But talking about non-existent block layer
>> functionality doesn't answer my the question about keeping user data
>> and filesystem metadata needed to reference that user data
>> coherent in persistent memory...
>
>
> One of the very useful tools for PCs in the '80s was reset-survivable
> RAMdisks. Given the existence of persistent memory in a machine, this is a
> pretty obvious feature to provide.
I think that a file on pmfs or ext4-xip will work like this. Ideally
/dev/loop will be XIP-capable if the file it's sitting on top of is
XIP.
>
>
>>> If that's happening,
>>> then, assuming that there are no metadata changes, you could just
>>> flush the relevant hw caches. This assumes, of course, no dm-crypt,
>>> no btrfs-style checksumming, and, in general, nothing else that would
>>> require stable pages or similar things.
>>
>>
>> Well yes. Data IO path transformations are another reason why we'll
>> need the volatile page cache involved in the persistent memory IO
>> path. It follows immediately from this that applicaitons will still
>> require fsync() and other data integrity operations because they
>> have no idea where the persistence domain boundary lives in the IO
>> stack.
>
>
> And my point, stated a few times now, is there should be a way for
> applications to discover the existence and characteristics of persistent
> memory being used in the system.
Agreed. Or maybe just some very low-level library that exposes a more
useful interface (e.g. sync this domain) to applications.
--Andy
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2014-01-23 19:54 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-17 0:56 Andy Lutomirski
2014-01-17 4:17 ` Howard Chu
2014-01-17 19:22 ` Andy Lutomirski
2014-01-21 7:38 ` Howard Chu
2014-01-21 11:17 ` [Lsf-pc] " Dave Chinner
2014-01-21 13:57 ` Howard Chu
2014-01-21 20:20 ` Dave Chinner
2014-01-21 16:48 ` Andy Lutomirski
2014-01-21 20:36 ` Dave Chinner
2014-01-21 20:59 ` Andy Lutomirski
2014-01-21 23:03 ` Dave Chinner
2014-01-21 23:22 ` Andy Lutomirski
2014-01-22 8:13 ` Howard Chu
2014-01-23 19:54 ` Andy Lutomirski [this message]
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='CALCETrU=WNbpoNyNFZOw94B=1y6ad=dASgAmOGLuKp5k2cdD4g@mail.gmail.com' \
--to=luto@amacapital.net \
--cc=david@fromorbit.com \
--cc=hyc@symas.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lsf-pc@lists.linux-foundation.org \
/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