[PATCH v6 1/5] mm: page_isolation: move has_unmovable_pages() to mm/page_isolation.c

2022-02-22 Thread Zi Yan
From: Zi Yan has_unmovable_pages() is only used in mm/page_isolation.c. Move it from mm/page_alloc.c and make it static. Signed-off-by: Zi Yan Reviewed-by: Oscar Salvador Reviewed-by: Mike Rapoport --- include/linux/page-isolation.h | 2 - mm/page_alloc.c| 119

[PATCH v6 5/5] drivers: virtio_mem: use pageblock size as the minimum virtio_mem size.

2022-02-22 Thread Zi Yan
From: Zi Yan alloc_contig_range() now only needs to be aligned to pageblock_order, drop virtio_mem size requirement that it needs to be the max of pageblock_order and MAX_ORDER. Signed-off-by: Zi Yan --- drivers/virtio/virtio_mem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions

[PATCH v6 3/5] mm: make alloc_contig_range work at pageblock granularity

2022-02-22 Thread Zi Yan
From: Zi Yan alloc_contig_range() worked at MAX_ORDER-1 granularity to avoid merging pageblocks with different migratetypes. It might unnecessarily convert extra pageblocks at the beginning and at the end of the range. Change alloc_contig_range() to work at pageblock granularity. Special

[PATCH v6 2/5] mm: page_isolation: check specified range for unmovable pages

2022-02-22 Thread Zi Yan
From: Zi Yan Enable set_migratetype_isolate() to check specified sub-range for unmovable pages during isolation. Page isolation is done at max(MAX_ORDER_NR_PAEGS, pageblock_nr_pages) granularity, but not all pages within that granularity are intended to be isolated. For example

[PATCH v6 0/5] Use pageblock_order for cma and alloc_contig_range alignment.

2022-02-22 Thread Zi Yan
From: Zi Yan Hi all, This patchset tries to remove the MAX_ORDER-1 alignment requirement for CMA and alloc_contig_range(). It prepares for my upcoming changes to make MAX_ORDER adjustable at boot time[1]. It is on top of mmotm-2022-02-14-17-46. Changelog === V6 --- 1. Resolved compilation

[PATCH v6 4/5] mm: cma: use pageblock_order as the single alignment

2022-02-22 Thread Zi Yan
From: Zi Yan Now alloc_contig_range() works at pageblock granularity. Change CMA allocation, which uses alloc_contig_range(), to use pageblock_order alignment. Signed-off-by: Zi Yan --- include/linux/cma.h| 4 ++-- include/linux/mmzone.h | 5 + mm/page_alloc.c| 4 ++-- 3 files

Re: [PATCH v1 2/2] mm: enforce pageblock_order < MAX_ORDER

2022-02-14 Thread Zi Yan via iommu
-- > mm/Kconfig | 3 +++ > mm/page_alloc.c | 32 > 5 files changed, 20 insertions(+), 34 deletions(-) LGTM. Thanks. Reviewed-by: Zi Yan -- Best Regards, Yan, Zi signature.asc Description: OpenPGP digital signature ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v1 1/2] cma: factor out minimum alignment requirement

2022-02-14 Thread Zi Yan via iommu
| 20 +--- > 6 files changed, 19 insertions(+), 30 deletions(-) LGTM. Thanks. Reviewed-by: Zi Yan -- Best Regards, Yan, Zi signature.asc Description: OpenPGP digital signature ___ iommu mail

Re: [PATCH v5 3/6] mm: make alloc_contig_range work at pageblock granularity

2022-02-14 Thread Zi Yan via iommu
On 14 Feb 2022, at 2:59, Christophe Leroy wrote: > Le 11/02/2022 à 17:41, Zi Yan a écrit : >> From: Zi Yan >> >> alloc_contig_range() worked at MAX_ORDER-1 granularity to avoid merging >> pageblocks with different migratetypes. It might unnecessarily convert >>

Re: [PATCH v5 3/6] mm: make alloc_contig_range work at pageblock granularity

2022-02-14 Thread Zi Yan via iommu
On 14 Feb 2022, at 2:26, Christoph Hellwig wrote: >> +int >> +isolate_single_pageblock(unsigned long boundary_pfn, gfp_t gfp_flags, int >> isolate_before_boundary); > > Please avoid the completely unreadably long line. i.e. > > int isolate_single_pageblock(unsigned long boundary_pfn, gfp_t gfp_fl

[PATCH v5 5/6] drivers: virtio_mem: use pageblock size as the minimum virtio_mem size.

2022-02-11 Thread Zi Yan
From: Zi Yan alloc_contig_range() now only needs to be aligned to pageblock_order, drop virtio_mem size requirement that it needs to be the max of pageblock_order and MAX_ORDER. Signed-off-by: Zi Yan --- drivers/virtio/virtio_mem.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions

[PATCH v5 0/6] Use pageblock_order for cma and alloc_contig_range alignment.

2022-02-11 Thread Zi Yan
From: Zi Yan Hi all, This patchset tries to remove the MAX_ORDER-1 alignment requirement for CMA and alloc_contig_range(). It prepares for my upcoming changes to make MAX_ORDER adjustable at boot time[1]. It is on top of mmotm-2022-02-08-15-31. Changelog === V5 --- 1. Moved isolation address

[PATCH v5 6/6] arch: powerpc: adjust fadump alignment to be pageblock aligned.

2022-02-11 Thread Zi Yan
From: Zi Yan CMA only requires pageblock alignment now. Change CMA alignment in fadump too. Signed-off-by: Zi Yan --- arch/powerpc/include/asm/fadump-internal.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/powerpc/include/asm/fadump-internal.h b/arch/powerpc

[PATCH v5 2/6] mm: page_isolation: check specified range for unmovable pages

2022-02-11 Thread Zi Yan
From: Zi Yan Enable set_migratetype_isolate() to check specified sub-range for unmovable pages during isolation. Page isolation is done at max(MAX_ORDER_NR_PAEGS, pageblock_nr_pages) granularity, but not all pages within that granularity are intended to be isolated. For example

[PATCH v5 3/6] mm: make alloc_contig_range work at pageblock granularity

2022-02-11 Thread Zi Yan
From: Zi Yan alloc_contig_range() worked at MAX_ORDER-1 granularity to avoid merging pageblocks with different migratetypes. It might unnecessarily convert extra pageblocks at the beginning and at the end of the range. Change alloc_contig_range() to work at pageblock granularity. Special

[PATCH v5 4/6] mm: cma: use pageblock_order as the single alignment

2022-02-11 Thread Zi Yan
From: Zi Yan Now alloc_contig_range() works at pageblock granularity. Change CMA allocation, which uses alloc_contig_range(), to use pageblock_order alignment. Signed-off-by: Zi Yan --- include/linux/mmzone.h | 5 + kernel/dma/contiguous.c | 2 +- mm/cma.c| 6 ++ mm

[PATCH v5 1/6] mm: page_isolation: move has_unmovable_pages() to mm/page_isolation.c

2022-02-11 Thread Zi Yan
From: Zi Yan has_unmovable_pages() is only used in mm/page_isolation.c. Move it from mm/page_alloc.c and make it static. Signed-off-by: Zi Yan Reviewed-by: Oscar Salvador --- include/linux/page-isolation.h | 2 - mm/page_alloc.c| 119 - mm

Re: [PATCH v4 4/7] mm: make alloc_contig_range work at pageblock granularity

2022-02-04 Thread Zi Yan via iommu
On 4 Feb 2022, at 8:56, Oscar Salvador wrote: > On Wed, Jan 19, 2022 at 02:06:20PM -0500, Zi Yan wrote: >> From: Zi Yan >> >> alloc_contig_range() worked at MAX_ORDER-1 granularity to avoid merging >> pageblocks with different migratetypes. It might unnecessarily con

Re: [PATCH v4 3/7] mm: page_isolation: check specified range for unmovable pages

2022-02-02 Thread Zi Yan via iommu
On 2 Feb 2022, at 7:25, David Hildenbrand wrote: > On 02.02.22 13:18, Oscar Salvador wrote: >> On Wed, Jan 19, 2022 at 02:06:19PM -0500, Zi Yan wrote: >>> From: Zi Yan >>> >>> Enable set_migratetype_isolate() to check specified sub-range for >>> unm

Re: [PATCH v4 3/7] mm: page_isolation: check specified range for unmovable pages

2022-01-25 Thread Zi Yan via iommu
On 25 Jan 2022, at 8:21, Oscar Salvador wrote: > On Tue, Jan 25, 2022 at 02:19:46PM +0100, Oscar Salvador wrote: >> I know that this has been discussed previously, and the cover-letter already >> mentions it, but I think it would be great to have some sort of information >> about >> the problem i

Re: [PATCH v4 3/7] mm: page_isolation: check specified range for unmovable pages

2022-01-24 Thread Zi Yan via iommu
On 24 Jan 2022, at 4:55, Oscar Salvador wrote: > On 2022-01-19 20:06, Zi Yan wrote: >> From: Zi Yan >> >> Enable set_migratetype_isolate() to check specified sub-range for >> unmovable pages during isolation. Page isolation is done >> at max(MAX_ORDER_NR_PAEGS

Re: [PATCH v4 1/7] mm: page_alloc: avoid merging non-fallbackable pageblocks with others.

2022-01-24 Thread Zi Yan via iommu
On 24 Jan 2022, at 9:02, Mel Gorman wrote: > On Wed, Jan 19, 2022 at 02:06:17PM -0500, Zi Yan wrote: >> From: Zi Yan >> >> This is done in addition to MIGRATE_ISOLATE pageblock merge avoidance. >> It prepares for the upcoming removal of the MAX_ORDER-1 alignment

[PATCH v4 6/7] drivers: virtio_mem: use pageblock size as the minimum virtio_mem size.

2022-01-19 Thread Zi Yan
From: Zi Yan alloc_contig_range() now only needs to be aligned to pageblock_order, drop virtio_mem size requirement that it needs to be the max of pageblock_order and MAX_ORDER. Signed-off-by: Zi Yan --- drivers/virtio/virtio_mem.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions

[PATCH v4 7/7] arch: powerpc: adjust fadump alignment to be pageblock aligned.

2022-01-19 Thread Zi Yan
From: Zi Yan CMA only requires pageblock alignment now. Change CMA alignment in fadump too. Signed-off-by: Zi Yan --- arch/powerpc/include/asm/fadump-internal.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/powerpc/include/asm/fadump-internal.h b/arch/powerpc

[PATCH v4 5/7] mm: cma: use pageblock_order as the single alignment

2022-01-19 Thread Zi Yan
From: Zi Yan Now alloc_contig_range() works at pageblock granularity. Change CMA allocation, which uses alloc_contig_range(), to use pageblock_order alignment. Signed-off-by: Zi Yan --- include/linux/mmzone.h | 5 + kernel/dma/contiguous.c | 2 +- mm/cma.c| 6 ++ mm

[PATCH v4 2/7] mm: page_isolation: move has_unmovable_pages() to mm/page_isolation.c

2022-01-19 Thread Zi Yan
From: Zi Yan has_unmovable_pages() is only used in mm/page_isolation.c. Move it from mm/page_alloc.c and make it static. Signed-off-by: Zi Yan --- include/linux/page-isolation.h | 2 - mm/page_alloc.c| 119 - mm/page_isolation.c

[PATCH v4 3/7] mm: page_isolation: check specified range for unmovable pages

2022-01-19 Thread Zi Yan
From: Zi Yan Enable set_migratetype_isolate() to check specified sub-range for unmovable pages during isolation. Page isolation is done at max(MAX_ORDER_NR_PAEGS, pageblock_nr_pages) granularity, but not all pages within that granularity are intended to be isolated. For example

[PATCH v4 4/7] mm: make alloc_contig_range work at pageblock granularity

2022-01-19 Thread Zi Yan
From: Zi Yan alloc_contig_range() worked at MAX_ORDER-1 granularity to avoid merging pageblocks with different migratetypes. It might unnecessarily convert extra pageblocks at the beginning and at the end of the range. Change alloc_contig_range() to work at pageblock granularity. It is done by

[PATCH v4 0/7] Use pageblock_order for cma and alloc_contig_range alignment.

2022-01-19 Thread Zi Yan
From: Zi Yan Hi all, This patchset tries to remove the MAX_ORDER-1 alignment requirement for CMA and alloc_contig_range(). It prepares for my upcoming changes to make MAX_ORDER adjustable at boot time[1]. It is on top of mmotm-2021-12-29-20-07. Changelog from RFC === 1. Dropped two irrelevant

[PATCH v4 1/7] mm: page_alloc: avoid merging non-fallbackable pageblocks with others.

2022-01-19 Thread Zi Yan
From: Zi Yan This is done in addition to MIGRATE_ISOLATE pageblock merge avoidance. It prepares for the upcoming removal of the MAX_ORDER-1 alignment requirement for CMA and alloc_contig_range(). MIGRARTE_HIGHATOMIC should not merge with other migratetypes like MIGRATE_ISOLATE and MIGRARTE_CMA

Re: [RFC PATCH v3 7/8] drivers: virtio_mem: use pageblock size as the minimum virtio_mem size.

2022-01-14 Thread Zi Yan via iommu
On 14 Jan 2022, at 8:44, David Hildenbrand wrote: > On 05.01.22 22:47, Zi Yan wrote: >> From: Zi Yan >> >> alloc_contig_range() now only needs to be aligned to pageblock_order, >> drop virtio_mem size requirement that it needs to be the max of >> pageblock_orde

Re: [RFC PATCH v3 5/8] mm: page_isolation: check specified range for unmovable pages during isolation.

2022-01-14 Thread Zi Yan via iommu
On 14 Jan 2022, at 8:38, David Hildenbrand wrote: > On 05.01.22 22:47, Zi Yan wrote: >> From: Zi Yan >> >> Enable set_migratetype_isolate() to check specified sub-range for >> unmovable pages during isolation. Page isolation is done >> at max(MAX_ORDER_NR_PAEGS

Re: [RFC PATCH v3 2/8] mm: compaction: handle non-lru compound pages properly in isolate_migratepages_block().

2022-01-13 Thread Zi Yan via iommu
On 13 Jan 2022, at 9:57, Zi Yan wrote: > On 12 Jan 2022, at 6:01, David Hildenbrand wrote: > >> On 05.01.22 22:47, Zi Yan wrote: >>> From: Zi Yan >>> >>> In isolate_migratepages_block(), a !PageLRU tail page can be encountered >>> when the page is

Re: [RFC PATCH v3 3/8] mm: migrate: allocate the right size of non hugetlb or THP compound pages.

2022-01-13 Thread Zi Yan via iommu
On 12 Jan 2022, at 6:04, David Hildenbrand wrote: > On 05.01.22 22:47, Zi Yan wrote: >> From: Zi Yan >> >> alloc_migration_target() is used by alloc_contig_range() and non-LRU >> movable compound pages can be migrated. Current code does not allocate the >> righ

Re: [RFC PATCH v3 2/8] mm: compaction: handle non-lru compound pages properly in isolate_migratepages_block().

2022-01-13 Thread Zi Yan via iommu
On 12 Jan 2022, at 6:01, David Hildenbrand wrote: > On 05.01.22 22:47, Zi Yan wrote: >> From: Zi Yan >> >> In isolate_migratepages_block(), a !PageLRU tail page can be encountered >> when the page is larger than a pageblock. Use compound head page for the >>

Re: [RFC PATCH v3 1/8] mm: page_alloc: avoid merging non-fallbackable pageblocks with others.

2022-01-13 Thread Zi Yan via iommu
On 13 Jan 2022, at 7:28, David Hildenbrand wrote: > On 13.01.22 12:36, Mike Rapoport wrote: >> On Wed, Jan 12, 2022 at 11:54:49AM +0100, David Hildenbrand wrote: >>> On 05.01.22 22:47, Zi Yan wrote: >>>> From: Zi Yan >>>> >>>> This is done in

Re: [RFC PATCH v3 1/8] mm: page_alloc: avoid merging non-fallbackable pageblocks with others.

2022-01-13 Thread Zi Yan via iommu
On 12 Jan 2022, at 5:54, David Hildenbrand wrote: > On 05.01.22 22:47, Zi Yan wrote: >> From: Zi Yan >> >> This is done in addition to MIGRATE_ISOLATE pageblock merge avoidance. >> It prepares for the upcoming removal of the MAX_ORDER-1 alignment >> requireme

[RFC PATCH v3 8/8] arch: powerpc: adjust fadump alignment to be pageblock aligned.

2022-01-05 Thread Zi Yan
From: Zi Yan CMA only requires pageblock alignment now. Change CMA alignment in fadump too. Signed-off-by: Zi Yan --- arch/powerpc/include/asm/fadump-internal.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/powerpc/include/asm/fadump-internal.h b/arch/powerpc

[RFC PATCH v3 7/8] drivers: virtio_mem: use pageblock size as the minimum virtio_mem size.

2022-01-05 Thread Zi Yan
From: Zi Yan alloc_contig_range() now only needs to be aligned to pageblock_order, drop virtio_mem size requirement that it needs to be the max of pageblock_order and MAX_ORDER. Signed-off-by: Zi Yan --- drivers/virtio/virtio_mem.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff

[RFC PATCH v3 6/8] mm: cma: use pageblock_order as the single alignment

2022-01-05 Thread Zi Yan
From: Zi Yan Now alloc_contig_range() works at pageblock granularity. Change CMA allocation, which uses alloc_contig_range(), to use pageblock_order alignment. Signed-off-by: Zi Yan --- include/linux/mmzone.h | 5 + kernel/dma/contiguous.c | 2 +- mm/cma.c| 6 ++ mm

[RFC PATCH v3 5/8] mm: page_isolation: check specified range for unmovable pages during isolation.

2022-01-05 Thread Zi Yan
From: Zi Yan Enable set_migratetype_isolate() to check specified sub-range for unmovable pages during isolation. Page isolation is done at max(MAX_ORDER_NR_PAEGS, pageblock_nr_pages) granularity, but not all pages within that granularity are intended to be isolated. For example

[RFC PATCH v3 4/8] mm: make alloc_contig_range work at pageblock granularity

2022-01-05 Thread Zi Yan
From: Zi Yan alloc_contig_range() worked at MAX_ORDER-1 granularity to avoid merging pageblocks with different migratetypes. It might unnecessarily convert extra pageblocks at the beginning and at the end of the range. Change alloc_contig_range() to work at pageblock granularity. It is done by

[RFC PATCH v3 1/8] mm: page_alloc: avoid merging non-fallbackable pageblocks with others.

2022-01-05 Thread Zi Yan
From: Zi Yan This is done in addition to MIGRATE_ISOLATE pageblock merge avoidance. It prepares for the upcoming removal of the MAX_ORDER-1 alignment requirement for CMA and alloc_contig_range(). MIGRARTE_HIGHATOMIC should not merge with other migratetypes like MIGRATE_ISOLATE and MIGRARTE_CMA

[RFC PATCH v3 2/8] mm: compaction: handle non-lru compound pages properly in isolate_migratepages_block().

2022-01-05 Thread Zi Yan
From: Zi Yan In isolate_migratepages_block(), a !PageLRU tail page can be encountered when the page is larger than a pageblock. Use compound head page for the checks inside and skip the entire compound page when isolation succeeds. Signed-off-by: Zi Yan --- mm/compaction.c | 10 +++--- 1

[RFC PATCH v3 0/8] Use pageblock_order for cma and alloc_contig_range alignment.

2022-01-05 Thread Zi Yan
From: Zi Yan Hi all, This patchset tries to remove the MAX_ORDER - 1 alignment requirement for CMA and alloc_contig_range(). It prepares for my upcoming changes to make MAX_ORDER adjustable at boot time[1]. It is on top of mmotm-2021-12-29-20-07. The MAX_ORDER - 1 alignment requirement comes

[RFC PATCH v3 3/8] mm: migrate: allocate the right size of non hugetlb or THP compound pages.

2022-01-05 Thread Zi Yan
From: Zi Yan alloc_migration_target() is used by alloc_contig_range() and non-LRU movable compound pages can be migrated. Current code does not allocate the right page size for such pages. Check THP precisely using is_transparent_huge() and add allocation support for non-LRU compound pages

Re: [RFC PATCH v2 0/7] Use pageblock_order for cma and alloc_contig_range alignment.

2021-12-10 Thread Zi Yan via iommu
On 10 Dec 2021, at 13:36, David Hildenbrand wrote: > On 10.12.21 00:04, Zi Yan wrote: >> From: Zi Yan >> >> Hi all, > > Hi, > > thanks for working on that! > >> >> This patchset tries to remove the MAX_ORDER - 1 alignment requirement for CMA

Re: [RFC PATCH v2 3/7] mm: migrate: allocate the right size of non hugetlb or THP compound pages.

2021-12-10 Thread Zi Yan via iommu
On 10 Dec 2021, at 2:53, Eric Ren wrote: > Hi, > > On 2021/12/10 07:04, Zi Yan wrote: >> From: Zi Yan >> >> alloc_migration_target() is used by alloc_contig_range() and non-LRU >> movable compound pages can be migrated. Current code does not allocate the >>

Re: [RFC PATCH v2 1/7] mm: page_alloc: avoid merging non-fallbackable pageblocks with others.

2021-12-10 Thread Zi Yan via iommu
Hi Eric, Thanks for looking into my patch. On 10 Dec 2021, at 2:43, Eric Ren wrote: > Hi, > > On 2021/12/10 07:04, Zi Yan wrote: >> From: Zi Yan >> >> This is done in addition to MIGRATE_ISOLATE pageblock merge avoidance. >> It prepares for the upcoming rem

Re: [RFC PATCH v2 0/7] Use pageblock_order for cma and alloc_contig_range alignment.

2021-12-10 Thread Zi Yan via iommu
On 10 Dec 2021, at 2:30, Eric Ren wrote: > Hi Zi Yan, > > On 2021/12/10 07:04, Zi Yan wrote: >> From: Zi Yan >> >> Hi all, >> >> This patchset tries to remove the MAX_ORDER - 1 alignment requirement for CMA >> and alloc_contig_range(). It prepares

[RFC PATCH v2 7/7] arch: powerpc: adjust fadump alignment to be pageblock aligned.

2021-12-09 Thread Zi Yan
From: Zi Yan CMA only requires pageblock alignment now. Change CMA alignment in fadump too. Signed-off-by: Zi Yan --- arch/powerpc/include/asm/fadump-internal.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/powerpc/include/asm/fadump-internal.h b/arch/powerpc

[RFC PATCH v2 0/7] Use pageblock_order for cma and alloc_contig_range alignment.

2021-12-09 Thread Zi Yan
From: Zi Yan Hi all, This patchset tries to remove the MAX_ORDER - 1 alignment requirement for CMA and alloc_contig_range(). It prepares for my upcoming changes to make MAX_ORDER adjustable at boot time[1]. The MAX_ORDER - 1 alignment requirement comes from that alloc_contig_range() isolates

[RFC PATCH v2 2/7] mm: compaction: handle non-lru compound pages properly in isolate_migratepages_block().

2021-12-09 Thread Zi Yan
From: Zi Yan In isolate_migratepages_block(), a !PageLRU tail page can be encountered when the page is larger than a pageblock. Use compound head page for the checks inside and skip the entire compound page when isolation succeeds. Signed-off-by: Zi Yan --- mm/compaction.c | 10 +++--- 1

[RFC PATCH v2 5/7] mm: cma: use pageblock_order as the single alignment

2021-12-09 Thread Zi Yan
From: Zi Yan Now alloc_contig_range() works at pageblock granularity. Change CMA allocation, which uses alloc_contig_range(), to use pageblock_order alignment. Signed-off-by: Zi Yan --- include/linux/mmzone.h | 5 + kernel/dma/contiguous.c | 2 +- mm/cma.c| 6 ++ mm

[RFC PATCH v2 4/7] mm: make alloc_contig_range work at pageblock granularity

2021-12-09 Thread Zi Yan
From: Zi Yan alloc_contig_range() worked at MAX_ORDER-1 granularity to avoid merging pageblocks with different migratetypes. It might unnecessarily convert extra pageblocks at the beginning and at the end of the range. Change alloc_contig_range() to work at pageblock granularity. It is done by

[RFC PATCH v2 6/7] drivers: virtio_mem: use pageblock size as the minimum virtio_mem size.

2021-12-09 Thread Zi Yan
From: Zi Yan alloc_contig_range() now only needs to be aligned to pageblock_order, drop virtio_mem size requirement that it needs to be the max of pageblock_order and MAX_ORDER. Signed-off-by: Zi Yan --- drivers/virtio/virtio_mem.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions

[RFC PATCH v2 1/7] mm: page_alloc: avoid merging non-fallbackable pageblocks with others.

2021-12-09 Thread Zi Yan
From: Zi Yan This is done in addition to MIGRATE_ISOLATE pageblock merge avoidance. It prepares for the upcoming removal of the MAX_ORDER-1 alignment requirement for CMA and alloc_contig_range(). MIGRARTE_HIGHATOMIC should not merge with other migratetypes like MIGRATE_ISOLATE and MIGRARTE_CMA

[RFC PATCH v2 3/7] mm: migrate: allocate the right size of non hugetlb or THP compound pages.

2021-12-09 Thread Zi Yan
From: Zi Yan alloc_migration_target() is used by alloc_contig_range() and non-LRU movable compound pages can be migrated. Current code does not allocate the right page size for such pages. Check THP precisely using is_transparent_huge() and add allocation support for non-LRU compound pages

Re: [RFC PATCH 0/3] Use pageblock_order for cma and alloc_contig_range alignment.

2021-11-29 Thread Zi Yan via iommu
On 23 Nov 2021, at 12:32, Vlastimil Babka wrote: > On 11/23/21 17:35, Zi Yan wrote: >> On 19 Nov 2021, at 10:15, Zi Yan wrote: >>>>> From what my understanding, cma required alignment of >>>>> max(MAX_ORDER - 1, pageblock_order), because

Re: [RFC PATCH 0/3] Use pageblock_order for cma and alloc_contig_range alignment.

2021-11-23 Thread Zi Yan via iommu
On 19 Nov 2021, at 10:15, Zi Yan wrote: > On 19 Nov 2021, at 7:33, Vlastimil Babka wrote: > >> On 11/15/21 20:37, Zi Yan wrote: >>> From: Zi Yan >>> >>> Hi David, >>> >>> You suggested to make alloc_contig_range() deal with pageblo

Re: [RFC PATCH 0/3] Use pageblock_order for cma and alloc_contig_range alignment.

2021-11-19 Thread Zi Yan via iommu
On 19 Nov 2021, at 7:33, Vlastimil Babka wrote: > On 11/15/21 20:37, Zi Yan wrote: >> From: Zi Yan >> >> Hi David, >> >> You suggested to make alloc_contig_range() deal with pageblock_order instead >> of >> MAX_ORDER - 1 and get rid of MAX_ORDER - 1

Re: [RFC PATCH 0/3] Use pageblock_order for cma and alloc_contig_range alignment.

2021-11-16 Thread Zi Yan via iommu
On 16 Nov 2021, at 3:58, David Hildenbrand wrote: > On 15.11.21 20:37, Zi Yan wrote: >> From: Zi Yan >> >> Hi David, > > Hi, > > thanks for looking into this. > >> >> You suggested to make alloc_contig_range() deal with pageblock_order instead >

[RFC PATCH 1/3] mm: cma: alloc_contig_range: use pageblock_order as the single alignment.

2021-11-15 Thread Zi Yan
From: Zi Yan Pages are grouped in unit of pageblock_order for mobility. cma and alloc_contig_range() uses pageblock for isolation and migration, so aligning PFNs to pageblock_order is necessary. But the PFNs used in cma and alloc_contig_range() were aligned to max(pageblock_order, MAX_ORDER-1

[RFC PATCH 2/3] drivers: virtio_mem: use pageblock size as the minimum virtio_mem size.

2021-11-15 Thread Zi Yan
From: Zi Yan alloc_contig_range() now only needs to be aligned to pageblock_order, drop virtio_mem size requirement that it needs to be the max of pageblock_order and MAX_ORDER. Signed-off-by: Zi Yan --- drivers/virtio/virtio_mem.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions

[RFC PATCH 3/3] arch: powerpc: adjust fadump alignment to be pageblock aligned.

2021-11-15 Thread Zi Yan
From: Zi Yan CMA only requires pageblock alignment now. Change CMA alignment in fadump too. Signed-off-by: Zi Yan --- arch/powerpc/include/asm/fadump-internal.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/powerpc/include/asm/fadump-internal.h b/arch/powerpc

[RFC PATCH 0/3] Use pageblock_order for cma and alloc_contig_range alignment.

2021-11-15 Thread Zi Yan
From: Zi Yan Hi David, You suggested to make alloc_contig_range() deal with pageblock_order instead of MAX_ORDER - 1 and get rid of MAX_ORDER - 1 dependency in virtio_mem[1]. This patchset is my attempt to achieve that. Please take a look and let me know if I am doing it correctly or not

[RFC PATCH 3/3] arch: powerpc: adjust fadump alignment to pageblock aligned.

2021-11-15 Thread Zi Yan
From: Zi Yan CMA only requires pageblock alignment. Change fadump too. Signed-off-by: Zi Yan --- arch/powerpc/include/asm/fadump-internal.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/powerpc/include/asm/fadump-internal.h b/arch/powerpc/include/asm/fadump

Re: Boot crash due to "x86/msi: Consolidate MSI allocation"

2020-10-01 Thread Zi Yan
On 1 Oct 2020, at 4:22, Thomas Gleixner wrote: > Yan, > > On Wed, Sep 30 2020 at 21:29, Zi Yan wrote: >> I am running linux-next on my Dell R630 and the system crashed at boot >> time. I bisected linux-next and got to your commit: >> >> x86/msi: Consolidate M