Re: [PATCH 4/6] xfs: Set BH_New for allocated DAX blocks in __xfs_get_blocks()

2016-09-27 Thread Christoph Hellwig
On Tue, Sep 27, 2016 at 07:17:07PM +0200, Jan Kara wrote: > OK, the changelog is stale but I actually took care to integrate this with > your iomap patches and for the new invalidation code in iomap_dax_actor() > to work we need this additional information... It's not just the changelogs (which

Re: [PATCH v3 00/11] re-enable DAX PMD support

2016-09-27 Thread Christoph Hellwig
On Tue, Sep 27, 2016 at 02:47:51PM -0600, Ross Zwisler wrote: > DAX PMDs have been disabled since Jan Kara introduced DAX radix tree based > locking. This series allows DAX PMDs to participate in the DAX radix tree > based locking scheme so that they can be re-enabled. > > Jan and Christoph, can

Re: [PATCH v3 09/11] dax: add struct iomap based DAX PMD support

2016-09-27 Thread Dave Chinner
On Tue, Sep 27, 2016 at 02:48:00PM -0600, Ross Zwisler wrote: > DAX PMDs have been disabled since Jan Kara introduced DAX radix tree based > locking. This patch allows DAX PMDs to participate in the DAX radix tree > based locking scheme so that they can be re-enabled using the new struct > iomap

Re: [PATCH v3 04/11] ext2: remove support for DAX PMD faults

2016-09-27 Thread Dave Chinner
On Tue, Sep 27, 2016 at 02:47:55PM -0600, Ross Zwisler wrote: > DAX PMD support was added via the following commit: > > commit e7b1ea2ad658 ("ext2: huge page fault support") > > I believe this path to be untested as ext2 doesn't reliably provide block > allocations that are aligned to 2MiB. In

案例:客户一再地提出不同的条件,怎么处理?

2016-09-27 Thread 案例:客户一再地提出不同的条件,怎么处理?先生
销售精英2天强化训练 【时间地点】 2016年 10月15-16日深圳11月05-06日上海 11月19-20日北京11月26-27日深圳12月17-18日上海 Judge(评价)一个人,一个公司是不是优秀,不要看他是不是Harvard(哈佛大学),是不是Stanford(斯坦福大学).不要judge(评价)里面有多少名牌大学毕业生,而要judge(评价)这帮人干活是不是发疯一样干,看他每天下班是不是笑眯眯回家! ——阿里巴巴公司马云 ——课程简介 第一章客户需求分析 思考:

[PATCH v3 11/11] dax: remove "depends on BROKEN" from FS_DAX_PMD

2016-09-27 Thread Ross Zwisler
Now that DAX PMD faults are once again working and are now participating in DAX's radix tree locking scheme, allow their config option to be enabled. Signed-off-by: Ross Zwisler --- fs/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/Kconfig

[PATCH v3 01/11] ext4: allow DAX writeback for hole punch

2016-09-27 Thread Ross Zwisler
Currently when doing a DAX hole punch with ext4 we fail to do a writeback. This is because the logic around filemap_write_and_wait_range() in ext4_punch_hole() only looks for dirty page cache pages in the radix tree, not for dirty DAX exceptional entries. Signed-off-by: Ross Zwisler

[PATCH v3 10/11] xfs: use struct iomap based DAX PMD fault path

2016-09-27 Thread Ross Zwisler
Switch xfs_filemap_pmd_fault() from using dax_pmd_fault() to the new and improved iomap_dax_pmd_fault(). Also, now that it has no more users, remove xfs_get_blocks_dax_fault(). Signed-off-by: Ross Zwisler --- fs/xfs/xfs_aops.c | 25 +

[PATCH v3 07/11] dax: coordinate locking for offsets in PMD range

2016-09-27 Thread Ross Zwisler
DAX radix tree locking currently locks entries based on the unique combination of the 'mapping' pointer and the pgoff_t 'index' for the entry. This works for PTEs, but as we move to PMDs we will need to have all the offsets within the range covered by the PMD to map to the same bit lock. To

[PATCH v3 04/11] ext2: remove support for DAX PMD faults

2016-09-27 Thread Ross Zwisler
DAX PMD support was added via the following commit: commit e7b1ea2ad658 ("ext2: huge page fault support") I believe this path to be untested as ext2 doesn't reliably provide block allocations that are aligned to 2MiB. In my testing I've been unable to get ext2 to actually fault in a PMD. It

[PATCH v3 03/11] dax: remove buffer_size_valid()

2016-09-27 Thread Ross Zwisler
Now that ext4 properly sets bh.b_size when we call get_block() for a hole, rely on that value and remove the buffer_size_valid() sanity check. Signed-off-by: Ross Zwisler Reviewed-by: Jan Kara --- fs/dax.c | 22 +- 1 file changed,

[PATCH v3 05/11] dax: make 'wait_table' global variable static

2016-09-27 Thread Ross Zwisler
The global 'wait_table' variable is only used within fs/dax.c, and generates the following sparse warning: fs/dax.c:39:19: warning: symbol 'wait_table' was not declared. Should it be static? Make it static so it has scope local to fs/dax.c, and to make sparse happy. Signed-off-by: Ross Zwisler

[PATCH v3 09/11] dax: add struct iomap based DAX PMD support

2016-09-27 Thread Ross Zwisler
DAX PMDs have been disabled since Jan Kara introduced DAX radix tree based locking. This patch allows DAX PMDs to participate in the DAX radix tree based locking scheme so that they can be re-enabled using the new struct iomap based fault handlers. There are currently three types of DAX 4k

Re: [PATCH 4/6] xfs: Set BH_New for allocated DAX blocks in __xfs_get_blocks()

2016-09-27 Thread Jan Kara
On Tue 27-09-16 10:01:18, Christoph Hellwig wrote: > On Tue, Sep 27, 2016 at 06:43:33PM +0200, Jan Kara wrote: > > So far we did not set BH_New for newly allocated blocks for DAX inodes > > in __xfs_get_blocks() because we wanted to avoid zeroing done in generic > > DAX code which was racy. Now

Re: [PATCH 4/6] xfs: Set BH_New for allocated DAX blocks in __xfs_get_blocks()

2016-09-27 Thread Christoph Hellwig
On Tue, Sep 27, 2016 at 06:43:33PM +0200, Jan Kara wrote: > So far we did not set BH_New for newly allocated blocks for DAX inodes > in __xfs_get_blocks() because we wanted to avoid zeroing done in generic > DAX code which was racy. Now the zeroing is gone so we can remove this > workaround and

[PATCH 2/6] ext2: Return BH_New buffers for zeroed blocks

2016-09-27 Thread Jan Kara
So far we did not return BH_New buffers from ext2_get_blocks() when we allocated and zeroed-out a block for DAX inode to avoid racy zeroing in DAX code. This zeroing is gone these days so we can remove the workaround. Signed-off-by: Jan Kara --- fs/ext2/inode.c | 3 +-- 1 file

[PATCH 5/6] mm: Invalidate DAX radix tree entries only if appropriate

2016-09-27 Thread Jan Kara
Currently invalidate_inode_pages2_range() and invalidate_mapping_pages() just delete all exceptional radix tree entries they find. For DAX this is not desirable as we track cache dirtiness in these entries and when they are evicted, we may not flush caches although it is necessary. This can for

[PATCH 3/6] ext4: Remove clearing of BH_New bit for zeroed blocks

2016-09-27 Thread Jan Kara
So far we did not return BH_New buffers from ext4_dax_get_block() because that would trigger racy zeroing in DAX code. This zeroing is gone these days so we can remove the workaround. Signed-off-by: Jan Kara --- fs/ext4/inode.c | 5 - 1 file changed, 5 deletions(-) diff --git

[PATCH 6/6] dax: Avoid page invalidation races and unnecessary radix tree traversals

2016-09-27 Thread Jan Kara
Currently each filesystem (possibly through generic_file_direct_write() or iomap_dax_rw()) takes care of invalidating page tables and evicting hole pages from the radix tree when write(2) to the file happens. This invalidation is only necessary when there is some block allocation resulting from

[PATCH 1/6] dax: Do not warn about BH_New buffers

2016-09-27 Thread Jan Kara
Filesystems will return BH_New buffers to dax code to indicate freshly allocated blocks which will then trigger synchronization of file mappings in page tables with actual block mappings. So do not warn about returned BH_New buffers. Signed-off-by: Jan Kara --- fs/dax.c | 11

[PATCH 0/6] dax: Page invalidation fixes

2016-09-27 Thread Jan Kara
Hello, these patches fix races when invalidating hole pages in DAX mappings. See changelogs for details. The series is based on my patches to write-protect DAX PTEs because we really need to closely track dirtiness (and cleanness!) of radix tree entries in DAX mappings in order to avoid

[PATCH 14/20] mm: Use vmf->page during WP faults

2016-09-27 Thread Jan Kara
So far we set vmf->page during WP faults only when we needed to pass it to the ->page_mkwrite handler. Set it in all the cases now and use that instead of passing page pointer explicitely around. Signed-off-by: Jan Kara --- mm/memory.c | 58

[PATCH 15/20] mm: Move part of wp_page_reuse() into the single call site

2016-09-27 Thread Jan Kara
wp_page_reuse() handles write shared faults which is needed only in wp_page_shared(). Move the handling only into that location to make wp_page_reuse() simpler and avoid a strange situation when we sometimes pass in locked page, sometimes unlocked etc. Signed-off-by: Jan Kara ---

[PATCH 13/20] mm: Pass vm_fault structure into do_page_mkwrite()

2016-09-27 Thread Jan Kara
We will need more information in the ->page_mkwrite() helper for DAX to be able to fully finish faults there. Pass vm_fault structure to do_page_mkwrite() and use it there so that information propagates properly from upper layers. Signed-off-by: Jan Kara --- mm/memory.c | 19

[PATCH 16/20] mm: Provide helper for finishing mkwrite faults

2016-09-27 Thread Jan Kara
Provide a helper function for finishing write faults due to PTE being read-only. The helper will be used by DAX to avoid the need of complicating generic MM code with DAX locking specifics. Signed-off-by: Jan Kara --- include/linux/mm.h | 1 + mm/memory.c| 65

[PATCH 10/20] mm: Move handling of COW faults into DAX code

2016-09-27 Thread Jan Kara
Move final handling of COW faults from generic code into DAX fault handler. That way generic code doesn't have to be aware of peculiarities of DAX locking so remove that knowledge. Signed-off-by: Jan Kara --- fs/dax.c| 22 -- include/linux/dax.h |

[PATCH 18/20] dax: Make cache flushing protected by entry lock

2016-09-27 Thread Jan Kara
Currently, flushing of caches for DAX mappings was ignoring entry lock. So far this was ok (modulo a bug that a difference in entry lock could cause cache flushing to be mistakenly skipped) but in the following patches we will write-protect PTEs on cache flushing and clear dirty tags. For that we

[PATCH 12/20] mm: Factor out common parts of write fault handling

2016-09-27 Thread Jan Kara
Currently we duplicate handling of shared write faults in wp_page_reuse() and do_shared_fault(). Factor them out into a common function. Signed-off-by: Jan Kara --- mm/memory.c | 78 + 1 file changed, 37 insertions(+), 41

[PATCH 05/20] mm: Trim __do_fault() arguments

2016-09-27 Thread Jan Kara
Use vm_fault structure to pass cow_page, page, and entry in and out of the function. That reduces number of __do_fault() arguments from 4 to 1. Signed-off-by: Jan Kara --- mm/memory.c | 53 +++-- 1 file changed, 23 insertions(+), 30

[PATCH 20/20] dax: Clear dirty entry tags on cache flush

2016-09-27 Thread Jan Kara
Currently we never clear dirty tags in DAX mappings and thus address ranges to flush accumulate. Now that we have locking of radix tree entries, we have all the locking necessary to reliably clear the radix tree dirty tag when flushing caches for corresponding address range. Similarly to

[PATCH 0/20 v3] dax: Clear dirty bits after flushing caches

2016-09-27 Thread Jan Kara
Hello, this is a third revision of my patches to clear dirty bits from radix tree of DAX inodes when caches for corresponding pfns have been flushed. This patch set is significantly larger than the previous version because I'm changing how ->fault, ->page_mkwrite, and ->pfn_mkwrite handlers may

[PATCH 09/20] mm: Factor out functionality to finish page faults

2016-09-27 Thread Jan Kara
Introduce function finish_fault() as a helper function for finishing page faults. It is rather thin wrapper around alloc_set_pte() but since we'd want to call this from DAX code or filesystems, it is still useful to avoid some boilerplate code. Signed-off-by: Jan Kara ---

[PATCH 11/20] mm: Remove unnecessary vma->vm_ops check

2016-09-27 Thread Jan Kara
We don't check whether vma->vm_ops is NULL in do_shared_fault() so there's hardly any point in checking it in wp_page_shared() which gets called only for shared file mappings as well. Signed-off-by: Jan Kara --- mm/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 04/20] mm: Use passed vm_fault structure in __do_fault()

2016-09-27 Thread Jan Kara
Instead of creating another vm_fault structure, use the one passed to __do_fault() for passing arguments into fault handler. Signed-off-by: Jan Kara --- mm/memory.c | 26 +++--- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/mm/memory.c

[PATCH 03/20] mm: Use pgoff in struct vm_fault instead of passing it separately

2016-09-27 Thread Jan Kara
struct vm_fault has already pgoff entry. Use it instead of passing pgoff as a separate argument and then assigning it later. Signed-off-by: Jan Kara --- mm/memory.c | 35 ++- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git

[PATCH 19/20] dax: Protect PTE modification on WP fault by radix tree entry lock

2016-09-27 Thread Jan Kara
Currently PTE gets updated in wp_pfn_shared() after dax_pfn_mkwrite() has released corresponding radix tree entry lock. When we want to writeprotect PTE on cache flush, we need PTE modification to happen under radix tree entry lock to ensure consisten updates of PTE and radix tree (standard faults

[PATCH 07/20] mm: Add orig_pte field into vm_fault

2016-09-27 Thread Jan Kara
Add orig_pte field to vm_fault structure to allow ->page_mkwrite handlers to fully handle the fault. This also allows us to save some passing of extra arguments around. Signed-off-by: Jan Kara --- include/linux/mm.h | 4 +-- mm/internal.h | 2 +- mm/khugepaged.c| 5

RETURNED MAIL: SEE TRANSCRIPT FOR DETAILS

2016-09-27 Thread MAILER-DAEMON
Your message was undeliverable due to the following reason: Your message was not delivered because the destination computer was not reachable within the allowed queue period. The amount of time a message is queued before it is returned depends on local configura- tion parameters. Most likely