Re: [PATCH 1/2] mm/memory_hotplug: Export shrink span functions for zone and node

2022-01-27 Thread Jonghyeon Kim
On Thu, Jan 27, 2022 at 10:54:23AM +0100, David Hildenbrand wrote: > On 27.01.22 10:41, Jonghyeon Kim wrote: > > On Wed, Jan 26, 2022 at 06:04:50PM +0100, David Hildenbrand wrote: > >> On 26.01.22 18:00, Jonghyeon Kim wrote: > >>> Export shrink_zone_span() and update_pgdat_span() functions to head

Re: [RFC PATCH rdma-next 01/10] RDMA: mr: Introduce is_pmem

2022-01-27 Thread Jeff Moyer
"Li, Zhijian" writes: > Copied to nvdimm list > > Thanks > > Zhijian > > > on 2022/1/6 14:12, Li Zhijian wrote: >> >> Add Dan to the party :) >> >> May i know whether there is any existing APIs to check whether >> a va/page backs to a nvdimm/pmem ? I don't know of one. You could try walk_system

Re: [PATCH v10 8/9] xfs: Implement ->notify_failure() for XFS

2022-01-27 Thread kernel test robot
Hi Shiyang, Thank you for the patch! Yet something to improve: [auto build test ERROR on linux/master] [also build test ERROR on linus/master v5.17-rc1 next-20220127] [cannot apply to xfs-linux/for-next] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting

Re: [PATCH v10 8/9] xfs: Implement ->notify_failure() for XFS

2022-01-27 Thread kernel test robot
Hi Shiyang, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linux/master] [also build test WARNING on linus/master v5.17-rc1 next-20220127] [cannot apply to xfs-linux/for-next] [If your patch is applied to the wrong git tree, kindly drop us a note. And when

Re: [PATCH v10 1/9] dax: Introduce holder for dax_device

2022-01-27 Thread kernel test robot
Hi Shiyang, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linux/master] [also build test WARNING on linus/master v5.17-rc1 next-20220127] [cannot apply to xfs-linux/for-next hnaz-mm/master] [If your patch is applied to the wrong git tree, kindly drop us a

Re: [PATCH v10 1/9] dax: Introduce holder for dax_device

2022-01-27 Thread kernel test robot
Hi Shiyang, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linux/master] [also build test WARNING on linus/master v5.17-rc1 next-20220127] [cannot apply to xfs-linux/for-next] [If your patch is applied to the wrong git tree, kindly drop us a note. And when

[PATCH v10 4/9] fsdax: fix function description

2022-01-27 Thread Shiyang Ruan
The function name has been changed, so the description should be updated too. Signed-off-by: Shiyang Ruan Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- fs/dax.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/dax.c b/fs/dax.c index cd03485867a7..c8d5708

[PATCH v10 7/9] mm: Introduce mf_dax_kill_procs() for fsdax case

2022-01-27 Thread Shiyang Ruan
This function is called at the end of RMAP routine, i.e. filesystem recovery function, to collect and kill processes using a shared page of DAX file. The difference with mf_generic_kill_procs() is, it accepts file's (mapping,offset) instead of struct page because different files' mappings and offs

[PATCH v10 8/9] xfs: Implement ->notify_failure() for XFS

2022-01-27 Thread Shiyang Ruan
Introduce xfs_notify_failure.c to handle failure related works, such as implement ->notify_failure(), register/unregister dax holder in xfs, and so on. If the rmap feature of XFS enabled, we can query it to find files and metadata which are associated with the corrupt data. For now all we do is k

[PATCH v10 6/9] mm: move pgoff_address() to vma_pgoff_address()

2022-01-27 Thread Shiyang Ruan
Since it is not a DAX-specific function, move it into mm and rename it to be a generic helper. Signed-off-by: Shiyang Ruan Reviewed-by: Christoph Hellwig --- fs/dax.c | 12 +--- include/linux/mm.h | 13 + 2 files changed, 14 insertions(+), 11 deletions(-) diff --g

[PATCH v10 3/9] pagemap,pmem: Introduce ->memory_failure()

2022-01-27 Thread Shiyang Ruan
When memory-failure occurs, we call this function which is implemented by each kind of devices. For the fsdax case, pmem device driver implements it. Pmem device driver will find out the filesystem in which the corrupted page located in. With dax_holder notify support, we are able to notify the

[PATCH v10 5/9] fsdax: Introduce dax_load_page()

2022-01-27 Thread Shiyang Ruan
The current dax_lock_page() locks dax entry by obtaining mapping and index in page. To support 1-to-N RMAP in NVDIMM, we need a new function to lock a specific dax entry corresponding to this file's mapping,index. And output the page corresponding to the specific dax entry for caller use. Signed-

[PATCH v10 9/9] fsdax: set a CoW flag when associate reflink mappings

2022-01-27 Thread Shiyang Ruan
Introduce a PAGE_MAPPING_DAX_COW flag to support association with CoW file mappings. In this case, the dax-RMAP already takes the responsibility to look up for shared files by given dax page. The page->mapping is no longer to used for rmap but for marking that this dax page is shared. And to make

[PATCH v10 2/9] mm: factor helpers for memory_failure_dev_pagemap

2022-01-27 Thread Shiyang Ruan
memory_failure_dev_pagemap code is a bit complex before introduce RMAP feature for fsdax. So it is needed to factor some helper functions to simplify these code. Signed-off-by: Shiyang Ruan Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- mm/memory-failure.c | 141 +

[PATCH v10 1/9] dax: Introduce holder for dax_device

2022-01-27 Thread Shiyang Ruan
To easily track filesystem from a pmem device, we introduce a holder for dax_device structure, and also its operation. This holder is used to remember who is using this dax_device: - When it is the backend of a filesystem, the holder will be the instance of this filesystem. - When this pmem d

[PATCH v10 0/9] fsdax: introduce fs query to support reflink

2022-01-27 Thread Shiyang Ruan
This patchset is aimed to support shared pages tracking for fsdax. Changes since V9: - Remove dax write/read lock patch - Remove dax_lock_entry() in dax_lock_mapping_entry() and rename it to dax_load_page() - Wrap dax code in memory-failure.c with #if IS_ENABLED(CONFIG_FS_DAX) - Wrap

Re: [PATCH 1/2] mm/memory_hotplug: Export shrink span functions for zone and node

2022-01-27 Thread David Hildenbrand
On 27.01.22 10:41, Jonghyeon Kim wrote: > On Wed, Jan 26, 2022 at 06:04:50PM +0100, David Hildenbrand wrote: >> On 26.01.22 18:00, Jonghyeon Kim wrote: >>> Export shrink_zone_span() and update_pgdat_span() functions to head >>> file. We need to update real number of spanned pages for NUMA nodes and

Re: [PATCH 1/2] mm/memory_hotplug: Export shrink span functions for zone and node

2022-01-27 Thread Jonghyeon Kim
On Wed, Jan 26, 2022 at 06:04:50PM +0100, David Hildenbrand wrote: > On 26.01.22 18:00, Jonghyeon Kim wrote: > > Export shrink_zone_span() and update_pgdat_span() functions to head > > file. We need to update real number of spanned pages for NUMA nodes and > > zones when we add memory device node s