Re: [PATCH v2 9/9] devm_memremap_pages: protect against pmem device unbind

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]