From: "hch@lst.de" <hch@lst.de>
To: "Williams, Dan J" <dan.j.williams@intel.com>
Cc: "hch@lst.de" <hch@lst.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"mingo@kernel.org" <mingo@kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"hpa@zytor.com" <hpa@zytor.com>,
"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
"ross.zwisler@linux.intel.com" <ross.zwisler@linux.intel.com>,
"boaz@plexistor.com" <boaz@plexistor.com>,
"david@fromorbit.com" <david@fromorbit.com>
Subject: Re: [PATCH v2 9/9] devm_memremap_pages: protect against pmem device unbind
Date: Thu, 27 Aug 2015 09:33:25 +0200 [thread overview]
Message-ID: <20150827073325.GB27207@lst.de> (raw)
In-Reply-To: <1440625157.31365.21.camel@intel.com>
On Wed, Aug 26, 2015 at 09:39:18PM +0000, Williams, Dan J wrote:
> On Wed, 2015-08-26 at 14:46 +0200, Christoph Hellwig wrote:
> > On Tue, Aug 25, 2015 at 09:28:13PM -0400, Dan Williams wrote:
> > > Given that:
> > >
> > > 1/ device ->remove() can not be failed
> > >
> > > 2/ a pmem device may be unbound at any time
> > >
> > > 3/ we do not know what other parts of the kernel are actively using a
> > > 'struct page' from devm_memremap_pages()
> > >
> > > ...provide a facility for active usages of device memory to block pmem
> > > device unbind. With a percpu_ref it should be feasible to take a
> > > reference on a per-I/O or other high frequency basis.
> >
> > Without a caller of get_page_map this is just adding dead code. I'd
> > suggest to group it in a series with that caller.
> >
>
> Agreed, we can drop this until the first user arrives.
>
> > Also if the page_map gets exposed in a header the name is a bit too generic.
> > memremap_map maybe?
>
> Done, and in the patch below I hide the internal implementation details
> of page_map in kernel/memremap.c and only expose the percpu_ref in the
> public memremap_map.
Yes, that looks good once we're getting the users for it.
--
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:[~2015-08-27 7:33 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-26 1:27 [PATCH v2 0/9] initial struct page support for pmem Dan Williams
2015-08-26 1:27 ` [PATCH v2 1/9] dax: drop size parameter to ->direct_access() Dan Williams
2015-08-26 1:27 ` [PATCH v2 2/9] mm: move __phys_to_pfn and __pfn_to_phys to asm/generic/memory_model.h Dan Williams
2015-09-18 23:42 ` Tyler Baker
2015-09-18 23:59 ` Dan Williams
2015-09-19 6:49 ` Tyler Baker
2015-09-29 19:21 ` Nicolas Pitre
2015-09-29 19:36 ` Tyler Baker
2015-09-29 19:47 ` Nicolas Pitre
2015-08-26 1:27 ` [PATCH v2 3/9] mm: ZONE_DEVICE for "device memory" Dan Williams
2015-08-26 1:27 ` [PATCH v2 4/9] add devm_memremap_pages Dan Williams
2015-08-26 1:27 ` [PATCH v2 5/9] x86, pmem: push fallback handling to arch code Dan Williams
2015-08-26 12:41 ` Christoph Hellwig
2015-08-26 21:34 ` Williams, Dan J
2015-08-27 7:33 ` hch
2015-08-28 20:22 ` Ross Zwisler
2015-08-28 21:41 ` Toshi Kani
2015-08-28 21:47 ` Dan Williams
2015-08-28 21:48 ` Toshi Kani
2015-08-29 4:04 ` Williams, Dan J
2015-08-29 13:57 ` hch
2015-08-26 1:27 ` [PATCH v2 6/9] libnvdimm, pfn: 'struct page' provider infrastructure Dan Williams
2015-08-26 1:28 ` [PATCH v2 7/9] libnvdimm, pmem: 'struct page' for pmem Dan Williams
2015-08-26 1:28 ` [PATCH v2 8/9] libnvdimm, pmem: direct map legacy pmem by default Dan Williams
2015-08-26 1:28 ` [PATCH v2 9/9] devm_memremap_pages: protect against pmem device unbind Dan Williams
2015-08-26 12:46 ` Christoph Hellwig
2015-08-26 21:39 ` Williams, Dan J
2015-08-27 7:33 ` hch [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=20150827073325.GB27207@lst.de \
--to=hch@lst.de \
--cc=boaz@plexistor.com \
--cc=dan.j.williams@intel.com \
--cc=david@fromorbit.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nvdimm@lists.01.org \
--cc=mingo@kernel.org \
--cc=ross.zwisler@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