[PATCH v4 17/18] mm, fs, dax: dax_flush_dma, handle dma vs block-map-change collisions

2017-12-23 Thread Dan Williams
Background: get_user_pages() pins file backed memory pages for access by dma devices. However, it only pins the memory pages not the page-to-file offset association. If a file is truncated the pages are mapped out of the file and dma may continue indefinitely into a page that is owned by a device

[PATCH v4 18/18] xfs, dax: wire up dax_flush_dma support via a new xfs_sync_dma helper

2017-12-23 Thread Dan Williams
xfs_break_layouts() scans for active pNFS layouts, drops locks and rescans for those layouts to be broken. xfs_sync_dma performs xfs_break_layouts and also scans for active dax-dma pages, drops locks and rescans for those pages to go idle. dax_flush_dma handles synchronizing against new page-busy

[PATCH v4 16/18] wait_bit: introduce {wait_on,wake_up}_atomic_one

2017-12-23 Thread Dan Williams
Add a generic facility for awaiting an atomic_t to reach a value of one. Page reference counts typically need to reach zero to be considered a free / inactive page. However, ZONE_DEVICE pages allocated via devm_memremap_pages() are never 'onlined', i.e. the put_page() typically done at init time

[PATCH v4 14/18] ext2: use DEFINE_FSDAX_AOPS

2017-12-23 Thread Dan Williams
In preparation for the dax implementation to start associating dax pages to inodes via page->mapping, we need to provide a 'struct address_space_operations' instance for dax. Otherwise, direct-I/O triggers incorrect page cache assumptions and warnings. Cc: Jan Kara Signed-off-by:

[PATCH v4 15/18] mm, fs, dax: use page->mapping to warn if dma collides with truncate

2017-12-23 Thread Dan Williams
Catch cases where truncate encounters pages that are still under active dma. This warning is a canary for potential data corruption as truncated blocks could be allocated to a new file while the device is still perform i/o. Here is an example of a collision that this implementation catches:

[PATCH v4 13/18] ext4: use DEFINE_FSDAX_AOPS

2017-12-23 Thread Dan Williams
In preparation for the dax implementation to start associating dax pages to inodes via page->mapping, we need to provide a 'struct address_space_operations' instance for dax. Otherwise, direct-I/O triggers incorrect page cache assumptions and warnings. Cc: "Theodore Ts'o" Cc:

[PATCH v4 09/18] mm, dax: enable filesystems to trigger dev_pagemap ->page_free callbacks

2017-12-23 Thread Dan Williams
In order to resolve collisions between filesystem operations and DMA to DAX mapped pages we need a callback when DMA completes. With a callback we can hold off filesystem operations while DMA is in-flight and then resume those operations when the last put_page() occurs on a DMA page. Recall that

[PATCH v4 12/18] xfs: use DEFINE_FSDAX_AOPS

2017-12-23 Thread Dan Williams
In preparation for the dax implementation to start associating dax pages to inodes via page->mapping, we need to provide a 'struct address_space_operations' instance for dax. Otherwise, direct-I/O triggers incorrect page cache assumptions and warnings. Cc: "Darrick J. Wong"

[PATCH v4 08/18] tools/testing/nvdimm: add 'bio_delay' mechanism

2017-12-23 Thread Dan Williams
In support of testing truncate colliding with dma add a mechanism that delays the completion of block I/O requests by a programmable number of seconds. This allows a truncate operation to be issued while page references are held for direct-I/O. Signed-off-by: Dan Williams

[PATCH v4 07/18] dax: store pfns in the radix

2017-12-23 Thread Dan Williams
In preparation for examining the busy state of dax pages in the truncate path, switch from sectors to pfns in the radix. Cc: Jan Kara Cc: Jeff Moyer Cc: Christoph Hellwig Cc: Matthew Wilcox Cc: Ross Zwisler

[PATCH v4 01/18] mm, dax: introduce pfn_t_special()

2017-12-23 Thread Dan Williams
In support of removing the VM_MIXEDMAP indication from DAX VMAs, introduce pfn_t_special() for drivers to indicate that _PAGE_SPECIAL should be used for DAX ptes. This also helps identify drivers like dccssblk that only want to use DAX in a read-only fashion without get_user_pages() support.

[PATCH v4 03/18] ext2: auto disable dax instead of failing mount

2017-12-23 Thread Dan Williams
Bring the ext2 filesystem in line with xfs that only warns and continues when the "-o dax" option is specified to mount and the backing device does not support dax. This is in preparation for removing dax support from devices that do not enable get_user_pages() operations on dax mappings. In other

[PATCH v4 06/18] dax: stop using VM_HUGEPAGE for dax

2017-12-23 Thread Dan Williams
This flag is deprecated in favor of the vma_is_dax() check in transparent_hugepage_enabled() added in commit baabda261424 "mm: always enable thp for dax mappings" Cc: Jeff Moyer Cc: Christoph Hellwig Cc: Ross Zwisler Reviewed-by:

[PATCH v4 04/18] dax: require 'struct page' by default for filesystem dax

2017-12-23 Thread Dan Williams
If a dax buffer from a device that does not map pages is passed to read(2) or write(2) as a target for direct-I/O it triggers SIGBUS. If gdb attempts to examine the contents of a dax buffer from a device that does not map pages it triggers SIGBUS. If fork(2) is called on a process with a dax

[PATCH v4 02/18] ext4: auto disable dax instead of failing mount

2017-12-23 Thread Dan Williams
Bring the ext4 filesystem in line with xfs that only warns and continues when the "-o dax" option is specified to mount and the backing device does not support dax. This is in preparation for removing dax support from devices that do not enable get_user_pages() operations on dax mappings. In other

[PATCH v4 10/18] mm, dev_pagemap: introduce CONFIG_DEV_PAGEMAP_OPS

2017-12-23 Thread Dan Williams
The HMM sub-system extended dev_pagemap to arrange a callback when a dev_pagemap managed page is freed. Since a dev_pagemap page is free / idle when its reference count is 1 it requires an additional branch to check the page-type at put_page() time. Given put_page() is a hot-path we do not want to

[PATCH v4 11/18] fs, dax: introduce DEFINE_FSDAX_AOPS

2017-12-23 Thread Dan Williams
In preparation for the dax implementation to start associating dax pages to inodes via page->mapping, we need to provide a 'struct address_space_operations' instance for dax. Otherwise, direct-I/O triggers incorrect page cache assumptions and warnings like the following: WARNING: CPU: 27 PID:

[PATCH v4 00/18] dax: fix dma vs truncate/hole-punch

2017-12-23 Thread Dan Williams
Changes since v3 [1]: * Kill the i_daxdma_lock, and do not impose any new locking constraints on filesystem implementations (Dave) * Reuse the existing i_mmap_lock for synchronizing against get_user_pages() by unmapping and causing punch-hole/truncate to re-fault the page before

[GIT PULL] libnvdimm fixes for 4.15-rc5

2017-12-23 Thread Williams, Dan J
Hi Linus, please pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm libnvdimm-fixes ...to receive: * NVDIMM namespaces, configured to enforce 1GB alignment, fail to initialize on platforms that mis-align the start or end of the physical address range. * The Linux

Re: linux-nvdimm@lists.01.org Business offer / Бизнес предложение

2017-12-23 Thread Business Group (hduooirl)
We offer e-mail databases at affordable prices. [dukems] For marketing, advertising, newsletters. [iagskces] This is the most effective way to attract customers for your business. [xllowpis] Country: Number of e-mail addresses. [zphmosin] RU : 7,5 million[dnjcqon] AU : 3,2 million[ivkgaf]