Re: [PATCH 04/20] mm/migrate: Convert buffer_migrate_page() to buffer_migrate_folio()

2022-06-06 Thread kernel test robot
Hi "Matthew, I love your patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v5.19-rc1 next-20220606] [cannot apply to jaegeuk-f2fs/dev-test trondmy-nfs/linux-next kdave/for-next xfs-linux/for-next] [If your patch is applied to the

[PATCH 14/20] hugetlb: Convert to migrate_folio

2022-06-06 Thread Matthew Wilcox (Oracle)
This involves converting migrate_huge_page_move_mapping(). We also need a folio variant of hugetlb_set_page_subpool(), but that's for a later patch. Signed-off-by: Matthew Wilcox (Oracle) --- fs/hugetlbfs/inode.c| 19 ++- include/linux/migrate.h | 6 +++--- mm/migrate.c

[PATCH 05/20] mm/migrate: Convert expected_page_refs() to folio_expected_refs()

2022-06-06 Thread Matthew Wilcox (Oracle)
Now that both callers have a folio, convert this function to take a folio & rename it. Signed-off-by: Matthew Wilcox (Oracle) --- mm/migrate.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/mm/migrate.c b/mm/migrate.c index 77b8c662c9ca..e0a593e5b5f9

[PATCH 00/20] Convert aops->migratepage to aops->migrate_folio

2022-06-06 Thread Matthew Wilcox (Oracle)
I plan to submit these patches through my pagecache tree in the upcoming merge window. I'm pretty happy that most filesystems are now using common code for ->migrate_folio; it's not something that most filesystem people want to care about. I'm running xfstests using xfs against it now, but it's

[PATCH 07/20] nfs: Convert to migrate_folio

2022-06-06 Thread Matthew Wilcox (Oracle)
Use a folio throughout this function. migrate_page() will be converted later. Signed-off-by: Matthew Wilcox (Oracle) --- fs/nfs/file.c | 4 +--- fs/nfs/internal.h | 6 -- fs/nfs/write.c| 16 3 files changed, 13 insertions(+), 13 deletions(-) diff --git

[PATCH 16/20] secretmem: Convert to migrate_folio

2022-06-06 Thread Matthew Wilcox (Oracle)
This is little more than changing the types over; there's no real work being done in this function. Signed-off-by: Matthew Wilcox (Oracle) --- mm/secretmem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/secretmem.c b/mm/secretmem.c index

[PATCH 15/20] balloon: Convert to migrate_folio

2022-06-06 Thread Matthew Wilcox (Oracle)
This is little more than changing the types over; there's no real work being done in this function. Signed-off-by: Matthew Wilcox (Oracle) --- mm/balloon_compaction.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/mm/balloon_compaction.c

[PATCH 20/20] mm/folio-compat: Remove migration compatibility functions

2022-06-06 Thread Matthew Wilcox (Oracle)
migrate_page_move_mapping(), migrate_page_copy() and migrate_page_states() are all now unused after converting all the filesystems from aops->migratepage() to aops->migrate_folio(). Signed-off-by: Matthew Wilcox (Oracle) --- include/linux/migrate.h | 11 --- mm/folio-compat.c | 22

[PATCH 06/20] btrfs: Convert btree_migratepage to migrate_folio

2022-06-06 Thread Matthew Wilcox (Oracle)
Use a folio throughout this function. migrate_page() will be converted later. Signed-off-by: Matthew Wilcox (Oracle) --- fs/btrfs/disk-io.c | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index

[PATCH 08/20] mm/migrate: Convert migrate_page() to migrate_folio()

2022-06-06 Thread Matthew Wilcox (Oracle)
Convert all callers to pass a folio. Most have the folio already available. Switch all users from aops->migratepage to aops->migrate_folio. Also turn the documentation into kerneldoc. Signed-off-by: Matthew Wilcox (Oracle) --- drivers/gpu/drm/i915/gem/i915_gem_userptr.c | 4 +--

[PATCH 10/20] btrfs: Convert btrfs_migratepage to migrate_folio

2022-06-06 Thread Matthew Wilcox (Oracle)
Use filemap_migrate_folio() to do the bulk of the work, and then copy the ordered flag across if needed. Signed-off-by: Matthew Wilcox (Oracle) --- fs/btrfs/inode.c | 26 +- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/fs/btrfs/inode.c

[PATCH 03/20] mm/migrate: Convert writeout() to take a folio

2022-06-06 Thread Matthew Wilcox (Oracle)
Use a folio throughout this function. Signed-off-by: Matthew Wilcox (Oracle) --- mm/migrate.c | 21 ++--- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/mm/migrate.c b/mm/migrate.c index d772ce63d7e2..f19246c12fe9 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@

[PATCH 02/20] mm/migrate: Convert fallback_migrate_page() to fallback_migrate_folio()

2022-06-06 Thread Matthew Wilcox (Oracle)
Use a folio throughout. migrate_page() will be converted to migrate_folio() later. Signed-off-by: Matthew Wilcox (Oracle) --- mm/migrate.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/mm/migrate.c b/mm/migrate.c index 75cb6aa38988..d772ce63d7e2

[PATCH 01/20] fs: Add aops->migrate_folio

2022-06-06 Thread Matthew Wilcox (Oracle)
Provide a folio-based replacement for aops->migratepage. Update the documentation to document migrate_folio instead of migratepage. Signed-off-by: Matthew Wilcox (Oracle) --- Documentation/filesystems/locking.rst | 5 ++-- Documentation/filesystems/vfs.rst | 13 ++-

[PATCH 04/20] mm/migrate: Convert buffer_migrate_page() to buffer_migrate_folio()

2022-06-06 Thread Matthew Wilcox (Oracle)
Use a folio throughout __buffer_migrate_folio(), add kernel-doc for buffer_migrate_folio() and buffer_migrate_folio_norefs(), move their declarations to buffer.h and switch all filesystems that have wired them up. Signed-off-by: Matthew Wilcox (Oracle) --- block/fops.c| 2 +-

[PATCH 09/20] mm/migrate: Add filemap_migrate_folio()

2022-06-06 Thread Matthew Wilcox (Oracle)
There is nothing iomap-specific about iomap_migratepage(), and it fits a pattern used by several other filesystems, so move it to mm/migrate.c, convert it to be filemap_migrate_folio() and convert the iomap filesystems to use it. Signed-off-by: Matthew Wilcox (Oracle) --- fs/gfs2/aops.c

[PATCH 19/20] fs: Remove aops->migratepage()

2022-06-06 Thread Matthew Wilcox (Oracle)
With all users converted to migrate_folio(), remove this operation. Signed-off-by: Matthew Wilcox (Oracle) --- include/linux/fs.h | 2 -- mm/compaction.c| 5 ++--- mm/migrate.c | 10 +- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/include/linux/fs.h

[PATCH 12/20] f2fs: Convert to filemap_migrate_folio()

2022-06-06 Thread Matthew Wilcox (Oracle)
filemap_migrate_folio() fits f2fs's needs perfectly. Signed-off-by: Matthew Wilcox (Oracle) --- fs/f2fs/checkpoint.c | 4 +--- fs/f2fs/data.c | 40 +--- fs/f2fs/f2fs.h | 4 fs/f2fs/node.c | 4 +--- 4 files changed, 3 insertions(+),

[PATCH 17/20] z3fold: Convert to migrate_folio

2022-06-06 Thread Matthew Wilcox (Oracle)
z3fold doesn't really use folios, but it needs to be called like this in order to migrate an individual page. Convert from a folio back to a page until we decide how to handle migration better for z3fold. Signed-off-by: Matthew Wilcox (Oracle) --- mm/z3fold.c | 8 +--- 1 file changed, 5

[PATCH 13/20] aio: Convert to migrate_folio

2022-06-06 Thread Matthew Wilcox (Oracle)
Use a folio throughout this function. Signed-off-by: Matthew Wilcox (Oracle) --- fs/aio.c | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/fs/aio.c b/fs/aio.c index 3c249b938632..a1911e86859c 100644 --- a/fs/aio.c +++ b/fs/aio.c @@

[PATCH 11/20] ubifs: Convert to filemap_migrate_folio()

2022-06-06 Thread Matthew Wilcox (Oracle)
filemap_migrate_folio() is a little more general than ubifs really needs, but it's better to share the code. Signed-off-by: Matthew Wilcox (Oracle) --- fs/ubifs/file.c | 29 ++--- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/fs/ubifs/file.c

[PATCH 18/20] zsmalloc: Convert to migrate_folio

2022-06-06 Thread Matthew Wilcox (Oracle)
zsmalloc doesn't really use folios, but it needs to be called like this in order to migrate an individual page. Convert from a folio back to a page until we decide how to handle migration better for zsmalloc. Signed-off-by: Matthew Wilcox (Oracle) --- mm/zsmalloc.c | 8 +--- 1 file

Re: [PATCH 2/5] iommu: Ensure device has the same iommu_ops as the domain

2022-06-06 Thread Robin Murphy
On 2022-06-06 17:51, Nicolin Chen wrote: Hi Robin, On Mon, Jun 06, 2022 at 03:33:42PM +0100, Robin Murphy wrote: On 2022-06-06 07:19, Nicolin Chen wrote: The core code should not call an iommu driver op with a struct device parameter unless it knows that the dev_iommu_priv_get() for that

Re: [PATCH 2/5] iommu: Ensure device has the same iommu_ops as the domain

2022-06-06 Thread Robin Murphy
On 2022-06-06 07:19, Nicolin Chen wrote: The core code should not call an iommu driver op with a struct device parameter unless it knows that the dev_iommu_priv_get() for that struct device was setup by the same driver. Otherwise in a mixed driver system the iommu_priv could be casted to the

Re: [PATCH v6 17/22] drm/shmem-helper: Add generic memory shrinker

2022-06-06 Thread Christian König
Am 05.06.22 um 18:47 schrieb Daniel Vetter: On Fri, 27 May 2022 at 01:55, Dmitry Osipenko wrote: Introduce a common DRM SHMEM shrinker framework that allows to reduce code duplication among DRM drivers by replacing theirs custom shrinker implementations with the generic shrinker. In order to