nvdimm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Barret Rhoden <brho@google.com>
To: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Cc: "Jérôme Glisse" <jglisse@redhat.com>,
	"Zhang, Yu C  <yu.c.zhang@intel.com>,
	KVM list <kvm@vger.kernel.org>,
	linux-nvdimm" <linux-nvdimm@lists.01.org>,
	"Jan Kara" <jack@suse.cz>, "David Hildenbrand" <david@redhat.com>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Linux MM" <linux-mm@kvack.org>,
	rkrcmar@redhat.com, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Christoph Hellwig" <hch@lst.de>
Subject: Re: [PATCH RFC 2/3] mm: Add support for exposing if dev_pagemap supports refcount pinning
Date: Tue, 4 Dec 2018 18:24:28 -0500	[thread overview]
Message-ID: <20181204182428.11bec385@gnomeregan.cam.corp.google.com> (raw)
In-Reply-To: <dd7296db5996f15cc3e666d008f209f5f24fa98e.camel@linux.intel.com>

Hi -

On 2018-12-04 at 14:51 Alexander Duyck
<alexander.h.duyck@linux.intel.com> wrote:

[snip]

> > I think the confusion arises from the fact that there are a few MMIO
> > resources with a struct page and all the rest MMIO resources without.
> > The problem comes from the coarse definition of pfn_valid(), it may
> > return 'true' for things that are not System-RAM, because pfn_valid()
> > may be something as simplistic as a single "address < X" check. Then
> > PageReserved is a fallback to clarify the pfn_valid() result. The
> > typical case is that MMIO space is not caught up in this linear map
> > confusion. An MMIO address may or may not have an associated 'struct
> > page' and in most cases it does not.  
> 
> Okay. I think I understand this somewhat now. So the page might be
> physically there, but with the reserved bit it is not supposed to be
> touched.
> 
> My main concern with just dropping the bit is that we start seeing some
> other uses that I was not certain what the impact would be. For example
> the functions like kvm_set_pfn_accessed start going in and manipulating
> things that I am not sure should be messed with for a DAX page.

One thing regarding the accessed and dirty bits is that we might want
to have DAX pages marked dirty/accessed, even if we can't LRU-reclaim
or swap them.  I don't have a real example and I'm fairly ignorant
about the specifics here.  But one possibility would be using the A/D
bits to detect changes to a guest's memory for VM migration.  Maybe
there would be issues with KSM too.

Barret

_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

  reply	other threads:[~2018-12-04 23:24 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-03 19:25 [PATCH RFC 0/3] Fix KVM misinterpreting Reserved page as an MMIO page Alexander Duyck
2018-12-03 19:25 ` [PATCH RFC 1/3] kvm: Split use cases for kvm_is_reserved_pfn to kvm_is_refcounted_pfn Alexander Duyck
2018-12-03 19:25 ` [PATCH RFC 2/3] mm: Add support for exposing if dev_pagemap supports refcount pinning Alexander Duyck
2018-12-03 19:47   ` Dan Williams
2018-12-03 20:21     ` Alexander Duyck
2018-12-03 20:31       ` Dan Williams
2018-12-03 20:53         ` Alexander Duyck
2018-12-03 21:05           ` Dan Williams
2018-12-03 21:50             ` Alexander Duyck
2018-12-04 19:08               ` Dan Williams
2018-12-04 22:51                 ` Alexander Duyck
2018-12-04 23:24                   ` Barret Rhoden [this message]
2018-12-05  0:01                     ` Alexander Duyck
2018-12-05  0:26                       ` Dan Williams
2018-12-05  8:13                         ` David Hildenbrand
2018-12-03 19:25 ` [PATCH RFC 3/3] kvm: Add additional check to determine if a page is refcounted Alexander Duyck
2018-12-04  6:59 ` [PATCH RFC 0/3] Fix KVM misinterpreting Reserved page as an MMIO page Yi Zhang
2018-12-04 18:45   ` Alexander Duyck

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=20181204182428.11bec385@gnomeregan.cam.corp.google.com \
    --to=brho@google.com \
    --cc=alexander.h.duyck@linux.intel.com \
    --cc=david@redhat.com \
    --cc=hch@lst.de \
    --cc=jack@suse.cz \
    --cc=jglisse@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.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;
as well as URLs for NNTP newsgroup(s).