Re: [PATCH 15/15] wait_bit: introduce {wait_on,wake_up}_devmap_idle

2017-11-10 Thread Christoph Hellwig
On Tue, Oct 31, 2017 at 04:22:56PM -0700, Dan Williams wrote: > Add hashed waitqueue infrastructure to wait for ZONE_DEVICE pages to > drop their reference counts and be considered idle for DMA. This > facility will be used for filesystem callbacks / wakeups when DMA to a > DAX mapped range of a

Re: [PATCH 13/15] mm, devmap: introduce CONFIG_DEVMAP_MANAGED_PAGES

2017-11-10 Thread Christoph Hellwig
On Tue, Oct 31, 2017 at 04:22:46PM -0700, Dan Williams wrote: > Combine the now three use cases of page-idle callbacks for ZONE_DEVICE > memory into a common selectable symbol. Very sparse changelog. I understand the Kconfig bit, but it also seems to introduce new static key functionality that

转发:井

2017-11-10 Thread 井庇
原邮件信息 - 发件人:井庇 收件人: ; 发送时间:2017-11-10 19:04:55 国际贸易离岸操作、国际避税暨离岸金融税务贸易筹划 课程背景 进出口企业为什么应当选择国际贸易离岸业务?为什么说全球贸易的绝大部分来自于离岸操作的运营结果?这其中到底隐含着什么样的诀窍? 除了不断地降低企业的运营和采购成本外,还有没有其他方法降低企业的国际运营成本?国际企业为什么要把总部设在国际离岸港?

Re: [PATCH 12/15] mm, dax: enable filesystems to trigger page-idle callbacks

2017-11-10 Thread Christoph Hellwig
> +DEFINE_MUTEX(devmap_lock); static? > +#if IS_ENABLED(CONFIG_FS_DAX) > +static void generic_dax_pagefree(struct page *page, void *data) > +{ > +} > + > +struct dax_device *fs_dax_claim_bdev(struct block_device *bdev, void *owner) > +{ > + struct dax_device *dax_dev; > + struct

Re: [PATCH 14/15] dax: associate mappings with inodes, and warn if dma collides with truncate

2017-11-10 Thread Christoph Hellwig
> + struct { > + /* > + * ZONE_DEVICE pages are never on an lru or handled by > + * a slab allocator, this points to the hosting device > + * page map. > + */ > +

Re: [PATCH] daxctl: remove libpmem dependency

2017-11-10 Thread Jeff Moyer
Oliver writes: > On Fri, Nov 10, 2017 at 1:40 AM, wrote: >> From: Łukasz Plewa >> >> The next version of libpmem will depend on libndctl - as daxctl >> depends on libpmem, it will make building packages inconvenient. >> This

Re: [PATCH] daxctl: remove libpmem dependency

2017-11-10 Thread Jeff Moyer
Dan Williams writes: >> I don't know, is it impossible to make this work w/o yanking out -lpmem? > > My preference would be that allthe pmem_memcpy* routines move to > libndctl since it is the lower level library. Arrange for nvml to > depend on libdnctl for this in

Re: [PATCH] daxctl: remove libpmem dependency

2017-11-10 Thread Dan Williams
On Fri, Nov 10, 2017 at 7:31 AM, Jeff Moyer wrote: > Oliver writes: > >> On Fri, Nov 10, 2017 at 1:40 AM, wrote: >>> From: Łukasz Plewa >>> >>> The next version of libpmem will depend on libndctl - as daxctl

Re: [PATCH] daxctl: remove libpmem dependency

2017-11-10 Thread Dan Williams
On Fri, Nov 10, 2017 at 8:42 AM, Jeff Moyer wrote: > Dan Williams writes: > >>> I don't know, is it impossible to make this work w/o yanking out -lpmem? >> >> My preference would be that allthe pmem_memcpy* routines move to >> libndctl since it is

[PATCH] ndctl: daxctl: fix mmap size

2017-11-10 Thread Dave Jiang
The size for mmap needs to be aligned to the region alignment. Add helper funciton to determine the actual size to be mmap'd. Signed-off-by: Dave Jiang --- daxctl/io.c | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/daxctl/io.c

[ndctl PATCH] ndctl, test: improve dax gup test coverage

2017-11-10 Thread Dan Williams
Add tests for read-only to read-write conversions of dax mappings and for the gup slow path where the initial fault is a write fault. The gup-slow-path write fault path has been broken for the pud case since it was introduced upstream. Cc: Dave Jiang Signed-off-by: Dan

[PATCH 3/4] mm: replace pmd_write with pmd_access_permitted in fault + gup paths

2017-11-10 Thread Dan Williams
The 'access_permitted' helper is used in the gup-fast path and goes beyond the simple _PAGE_RW check to also: * validate that the mapping is writable from a protection keys standpoint * validate that the pte has _PAGE_USER set since all fault paths where pmd_write is must be referencing

[PATCH 4/4] mm: replace pte_write with pte_access_permitted in fault + gup paths

2017-11-10 Thread Dan Williams
The 'access_permitted' helper is used in the gup-fast path and goes beyond the simple _PAGE_RW check to also: * validate that the mapping is writable from a protection keys standpoint * validate that the pte has _PAGE_USER set since all fault paths where pte_write is must be referencing

[PATCH 0/4] fix device-dax pud crash and fixup {pte,pmd,pud}_write

2017-11-10 Thread Dan Williams
Andrew, Here is a new version to the pud_write() fix [1], and some follow-on patches to use the '_access_permitted' helpers in fault and get_user_pages() paths where we are checking if the thread has access to write. I explicitly omit conversions for places where the kernel is checking the

[PATCH 2/4] mm: replace pud_write with pud_access_permitted in fault + gup paths

2017-11-10 Thread Dan Williams
The 'access_permitted' helper is used in the gup-fast path and goes beyond the simple _PAGE_RW check to also: * validate that the mapping is writable from a protection keys standpoint * validate that the pte has _PAGE_USER set since all fault paths where pud_write is must be referencing