Re: [Xen-devel] [PATCH RFCv2 0/4] mm/memory_hotplug: Introduce memory block types

2018-11-30 Thread Wei Yang
block types. Turns out abstracting too much was > rather confusing and not helpful. Properly document them. > >Notes: >- I wanted to convert the enum of types into a named enum but this > provoked all kinds of different errors. For now, I am d

Re: [Xen-devel] [PATCH RFCv2 1/4] mm/memory_hotplug: Introduce memory block types

2018-11-30 Thread Wei Yang
: >+ * The type of memory block was not further specified when adding the >+ * memory block. >+ * >+ * MEMORY_BLOCK_BOOT: >+ * This memory block was added during boot by the basic system. No >+ * specific device driver takes care of this memory block. This memory >+ * block type is onlined automatically by the kernel during boot and might >+ * later be managed by a different device driver, in which case the type >+ * might change. >+ */ >+enum { >+ MEMORY_BLOCK_NONE = 0, >+ MEMORY_BLOCK_UNSPECIFIED, >+ MEMORY_BLOCK_BOOT, >+}; >+ > /* These states are exposed to userspace as text strings in sysfs */ > #define MEM_ONLINE (1<<0) /* exposed to userspace */ > #define MEM_GOING_OFFLINE (1<<1) /* exposed to userspace */ >-- >2.17.2 -- Wei Yang Help you, Help me ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH RFCv2 2/4] mm/memory_hotplug: Replace "bool want_memblock" by "int type"

2018-11-30 Thread Wei Yang
t;Cc: Michal Hocko >Cc: Dan Williams >Cc: "Kirill A. Shutemov" >Cc: Oscar Salvador >Cc: Nicholas Piggin >Cc: Stephen Rothwell >Cc: Christophe Leroy >Cc: "Jonathan Neusch??fer" >Cc: Mauricio Faria de Oliveira >Cc: Vasily Gorbik >Cc: Arun KS

Re: [Xen-devel] [PATCH RFCv2 1/4] mm/memory_hotplug: Introduce memory block types

2018-12-03 Thread Wei Yang
e to keep it in here. > Yes, this make sense to me now. >(and I think at least for now it makes sense to not squash patch 1 and >2, to easier discuss the new user interface/concept introduced in this >patch). > >Thanks! > >-- > >Thanks, > >David / dhildenb

Re: [Xen-devel] [PATCH v5 1/2] memory_hotplug: Free pages as higher order

2018-11-19 Thread Wei Yang
On Thu, Oct 11, 2018 at 6:05 PM Vlastimil Babka wrote: > > On 10/10/18 6:56 PM, Arun KS wrote: > > On 2018-10-10 21:00, Vlastimil Babka wrote: > >> On 10/5/18 10:10 AM, Arun KS wrote: > >>> When free pages are done with higher order, time spend on > >>> coalescing pages by buddy allocator can be r

Re: [PATCH v2 2/7] kernel/resource: move and rename IORESOURCE_MEM_DRIVER_MANAGED

2020-09-14 Thread Wei Yang
for hotpluged memory? So we make them all in IORESOURCE_SYSRAM_XXX family? > >Cc: Andrew Morton >Cc: Michal Hocko >Cc: Dan Williams >Cc: Jason Gunthorpe >Cc: Kees Cook >Cc: Ard Biesheuvel >Cc: Pankaj Gupta >Cc: Baoquan He >Cc: Wei Yang >Cc: Eric Biederman >Cc:

Re: [PATCH v2 1/7] kernel/resource: make release_mem_region_adjustable() never fail

2020-09-14 Thread Wei Yang
es Cook >Cc: Ard Biesheuvel >Cc: Pankaj Gupta >Cc: Baoquan He >Cc: Wei Yang >Signed-off-by: David Hildenbrand >--- > include/linux/ioport.h | 4 ++-- > kernel/resource.c | 49 -- > mm/memory_hotplug.c| 22 +-

Re: [PATCH v2 1/7] kernel/resource: make release_mem_region_adjustable() never fail

2020-09-14 Thread Wei Yang
es Cook >Cc: Ard Biesheuvel >Cc: Pankaj Gupta >Cc: Baoquan He >Cc: Wei Yang >Signed-off-by: David Hildenbrand >--- > include/linux/ioport.h | 4 ++-- > kernel/resource.c | 49 -- > mm/memory_hotplug.c| 22 +-

Re: [PATCH v4 5/8] mm/memory_hotplug: MEMHP_MERGE_RESOURCE to specify merging of System RAM resources

2020-09-14 Thread Wei Yang
Srinivasan" >Cc: Haiyang Zhang >Cc: Stephen Hemminger >Cc: Wei Liu >Cc: Boris Ostrovsky >Cc: Juergen Gross >Cc: Stefano Stabellini >Cc: Roger Pau Monné >Cc: Julien Grall >Cc: Pankaj Gupta >Cc: Baoquan He >Cc: Wei Yang >Signed-off-by:

Re: [PATCH v2 1/7] kernel/resource: make release_mem_region_adjustable() never fail

2020-09-15 Thread Wei Yang
was done for > >#define devm_release_mem_region(dev, start, n) \ > __devm_release_region(dev, &iomem_resource, (start), (n)) > What I prefer is remove iomem_resource from the parameter list. Just use is in the function body. For the example you listed, __release_region() would

Re: [PATCH v2 1/7] kernel/resource: make release_mem_region_adjustable() never fail

2020-09-15 Thread Wei Yang
On Tue, Sep 15, 2020 at 11:15:53AM +0200, David Hildenbrand wrote: >On 15.09.20 11:06, Wei Yang wrote: >> On Tue, Sep 15, 2020 at 09:35:30AM +0200, David Hildenbrand wrote: >>> >>>>> static int __ref try_remove_memory(int nid, u64 start, u64 size) >>>

Re: [PATCH] kernel/resource: make iomem_resource implicit in release_mem_region_adjustable()

2020-09-16 Thread Wei Yang
licable. > Looks good to me. Reviewed-by: Wei Yang >Suggested-by: Wei Yang >Cc: Andrew Morton >Cc: Michal Hocko >Cc: Dan Williams >Cc: Jason Gunthorpe >Cc: Kees Cook >Cc: Ard Biesheuvel >Cc: Pankaj Gupta >Cc: Baoquan He >Cc: Wei Yang >Signed-off-by:

Re: [PATCH] kernel/resource: make iomem_resource implicit in release_mem_region_adjustable()

2020-09-16 Thread Wei Yang
On Wed, Sep 16, 2020 at 12:03:20PM +0200, David Hildenbrand wrote: >On 16.09.20 12:02, Wei Yang wrote: >> On Wed, Sep 16, 2020 at 09:30:41AM +0200, David Hildenbrand wrote: >>> "mem" in the name already indicates the root, similar to >>> release_mem_region() a

Re: [PATCH] kernel/resource: make iomem_resource implicit in release_mem_region_adjustable()

2020-09-16 Thread Wei Yang
On Wed, Sep 16, 2020 at 02:16:25PM +0200, David Hildenbrand wrote: >On 16.09.20 14:10, Wei Yang wrote: >> On Wed, Sep 16, 2020 at 12:03:20PM +0200, David Hildenbrand wrote: >>> On 16.09.20 12:02, Wei Yang wrote: >>>> On Wed, Sep 16, 2020 at 09:30:41AM +0200, David Hil

Re: [PATCH v4 5/8] mm/memory_hotplug: MEMHP_MERGE_RESOURCE to specify merging of System RAM resources

2020-09-16 Thread Wei Yang
>Cc: Juergen Gross >Cc: Stefano Stabellini >Cc: Roger Pau Monné >Cc: Julien Grall >Cc: Pankaj Gupta >Cc: Baoquan He >Signed-off-by: David Hildenbrand Reviewed-by: Wei Yang >--- > include/linux/ioport.h | 4 +++ > include/linux/memory_hotplug.h

Re: [PATCH v4 7/8] xen/balloon: try to merge system ram resources

2020-09-16 Thread Wei Yang
: Andrew Morton >Cc: Michal Hocko >Cc: Boris Ostrovsky >Cc: Juergen Gross >Cc: Stefano Stabellini >Cc: Roger Pau Monné >Cc: Julien Grall >Cc: Pankaj Gupta >Cc: Baoquan He >Signed-off-by: David Hildenbrand Reviewed-by: Wei Yang >--- > drivers/xen/

Re: [PATCH v4 8/8] hv_balloon: try to merge system ram resources

2020-09-16 Thread Wei Yang
ew Morton >Cc: Michal Hocko >Cc: "K. Y. Srinivasan" >Cc: Haiyang Zhang >Cc: Stephen Hemminger >Cc: Wei Liu >Cc: Pankaj Gupta >Cc: Baoquan He >Signed-off-by: David Hildenbrand Reviewed-by: Wei Yang >--- > drivers/hv/hv_balloon.c | 2 +- > 1

Re: [PATCH v4 6/8] virtio-mem: try to merge system ram resources

2020-09-16 Thread Wei Yang
Andrew Morton >Cc: Michal Hocko >Cc: Dan Williams >Cc: Michael S. Tsirkin >Cc: Jason Wang >Cc: Pankaj Gupta >Cc: Baoquan He >Signed-off-by: David Hildenbrand Reviewed-by: Wei Yang >--- > drivers/virtio/virtio_mem.c | 3 ++- > 1 file changed, 2 insertions(+

Re: [PATCH RFC 1/4] mm/page_alloc: convert "report" flag of __free_one_page() to a proper flag

2020-09-17 Thread Wei Yang
e type - should >be good enough for internal purposes. > >Cc: Andrew Morton >Cc: Alexander Duyck >Cc: Mel Gorman >Cc: Michal Hocko >Cc: Dave Hansen >Cc: Vlastimil Babka >Cc: Wei Yang >Cc: Oscar Salvador >Cc: Mike Rapoport >Signed

Re: [PATCH RFC 2/4] mm/page_alloc: place pages to tail in __putback_isolated_page()

2020-09-17 Thread Wei Yang
figurable by the >instance triggering undo of isolation (e.g., alloc_contig_range(), >memory onlining, memory offlining). > >Cc: Andrew Morton >Cc: Alexander Duyck >Cc: Mel Gorman >Cc: Michal Hocko >Cc: Dave Hansen >Cc: Vlastimil Babka >Cc: Wei Yang >Cc: Oscar Sal

Re: [PATCH RFC 2/4] mm/page_alloc: place pages to tail in __putback_isolated_page()

2020-09-17 Thread Wei Yang
he changed page isolation >behavior (which I doubt), we can always make this configurable by the >instance triggering undo of isolation (e.g., alloc_contig_range(), >memory onlining, memory offlining). > >Cc: Andrew Morton >Cc: Alexander Duyck >Cc: Mel Gorman >Cc: Michal Hocko

Re: [PATCH RFC 3/4] mm/page_alloc: always move pages to the tail of the freelist in unset_migratetype_isolate()

2020-09-17 Thread Wei Yang
nset_migratetype_isolate() is used in __offline_pages if my understanding is correct. How does it contribute on online_pages? > >Cc: Andrew Morton >Cc: Alexander Duyck >Cc: Mel Gorman >Cc: Michal Hocko >Cc: Dave Hansen >Cc: Vlastimil Babka >Cc: Wei Yang >Cc: Oscar Salvado

Re: [PATCH RFC 0/4] mm: place pages to the freelist tail when onling and undoing isolation

2020-09-17 Thread Wei Yang
gt;So while vmemmap on hotplugged memory would tackle some part of the issue, >there are cases where this approach is better, and there are even benefits >when combining both. While everything changes with shuffle. > >Thanks! > >David > >> >> I was about to give it a new respin now that thw hwpoison stuff has been >> settled. >> >> [1] https://patchwork.kernel.org/cover/11059175/ >> -- Wei Yang Help you, Help me

Re: [PATCH RFC 2/4] mm/page_alloc: place pages to tail in __putback_isolated_page()

2020-09-20 Thread Wei Yang
On Fri, Sep 18, 2020 at 09:27:23AM +0200, David Hildenbrand wrote: >On 18.09.20 04:07, Wei Yang wrote: >> On Wed, Sep 16, 2020 at 08:34:09PM +0200, David Hildenbrand wrote: >>> __putback_isolated_page() already documents that pages will be placed to >>> the tail of the

Re: [PATCH RFC 0/4] mm: place pages to the freelist tail when onling and undoing isolation

2020-09-23 Thread Wei Yang
>onlining a bunch of blocks as zone_movable first and only later convert to >zone_normal in a controlled way when existing normal zone becomes depeted? > To be honest, David's approach is easy to understand for me. And I don't see some negative effect. >I guess it's an issue that the e.g. 128M block onlines are so disconnected from >each other it's hard to employ a strategy that works best for e.g. a whole >bunch >of GB onlined at once. But I noticed some effort towards new API, so maybe that >will be solved there too? > >> Thanks! >> >> David >> >>> >>> I was about to give it a new respin now that thw hwpoison stuff has been >>> settled. >>> >>> [1] https://patchwork.kernel.org/cover/11059175/ >>> >> -- Wei Yang Help you, Help me

Re: [PATCH RFC 3/4] mm/page_alloc: always move pages to the tail of the freelist in unset_migratetype_isolate()

2020-09-24 Thread Wei Yang
o >> be placed to the tail of the freelist. >> >> Cc: Andrew Morton >> Cc: Alexander Duyck >> Cc: Mel Gorman >> Cc: Michal Hocko >> Cc: Dave Hansen >> Cc: Vlastimil Babka >> Cc: Wei Yang >> Cc: Oscar Salvador >> Cc: M

Re: [PATCH v1 1/5] mm/page_alloc: convert "report" flag of __free_one_page() to a proper flag

2020-09-29 Thread Wei Yang
e type - should >be good enough for internal purposes. > >Reviewed-by: Alexander Duyck >Reviewed-by: Vlastimil Babka >Reviewed-by: Oscar Salvador >Cc: Andrew Morton >Cc: Alexander Duyck >Cc: Mel Gorman >Cc: Michal Hocko >Cc: Dave Hansen >Cc: Vlastimil Babka &g

Re: [PATCH v1 2/5] mm/page_alloc: place pages to tail in __putback_isolated_page()

2020-09-29 Thread Wei Yang
hen undoing isolation of larger ranges, and after >free_contig_range(). > >Reviewed-by: Alexander Duyck >Reviewed-by: Oscar Salvador >Cc: Andrew Morton >Cc: Alexander Duyck >Cc: Mel Gorman >Cc: Michal Hocko >Cc: Dave Hansen >Cc: Vlastimil Babka >Cc: We

Re: [PATCH v1 3/5] mm/page_alloc: always move pages to the tail of the freelist in unset_migratetype_isolate()

2020-09-29 Thread Wei Yang
gt; >This change results in all pages getting onlined via online_pages() to >be placed to the tail of the freelist. > >Reviewed-by: Oscar Salvador >Cc: Andrew Morton >Cc: Alexander Duyck >Cc: Mel Gorman >Cc: Michal Hocko >Cc: Dave Hansen >Cc: Vlastimil Babka >C

Re: [PATCH v1 4/5] mm/page_alloc: place pages to tail in __free_pages_core()

2020-09-29 Thread Wei Yang
uffle after a sequence of generic_online_page() calls in the >relevant callers. > >Reviewed-by: Vlastimil Babka >Reviewed-by: Oscar Salvador >Cc: Andrew Morton >Cc: Alexander Duyck >Cc: Mel Gorman >Cc: Michal Hocko >Cc: Dave Hansen >Cc: Vlastimil Babka >Cc: W

Re: [PATCH v1 5/5] mm/memory_hotplug: update comment regarding zone shuffling

2020-09-29 Thread Wei Yang
>Cc: Alexander Duyck >Cc: Mel Gorman >Cc: Michal Hocko >Cc: Dave Hansen >Cc: Vlastimil Babka >Cc: Wei Yang >Cc: Oscar Salvador >Cc: Mike Rapoport >Signed-off-by: David Hildenbrand Reviewed-by: Wei Yang >--- > mm/memory_hotplug.c | 11 --- > 1 fi

Re: [PATCH v1 3/5] mm/page_alloc: always move pages to the tail of the freelist in unset_migratetype_isolate()

2020-09-30 Thread Wei Yang
On Tue, Sep 29, 2020 at 12:12:14PM +0200, David Hildenbrand wrote: >On 29.09.20 11:18, Wei Yang wrote: >> On Mon, Sep 28, 2020 at 08:21:08PM +0200, David Hildenbrand wrote: >>> Page isolation doesn't actually touch the pages, it simply isolates >>> pageblocks

Re: [PATCH] kernel/resource: Fix use of ternary condition in release_mem_region_adjustable

2020-10-09 Thread Wei Yang
Fixes: 5fd23bd0d739 ("kernel/resource: make release_mem_region_adjustable() >never fail") >Link: https://github.com/ClangBuiltLinux/linux/issues/1159 >Signed-off-by: Nathan Chancellor Reviewed-by: Wei Yang >--- > >Presumably, this will be squashed but I included a fixes tag >

Re: [PATCH] xen/balloon: fix page onlining when populating new zone

2022-04-08 Thread Wei Yang
and that commit shouldn't have changed the condition when >> building the zonelist, but just the ones in the allocation paths. > >In regard to kswapd, that is currently being worked on via > >https://lkml.kernel.org/r/20220329010901.1654-2-richard.weiy...@gmail.com > Thanks, David Do you think it is the right time to repost the original fix? >-- >Thanks, > >David / dhildenb -- Wei Yang Help you, Help me

Re: [PATCH] mm, page_alloc: fix build_zonerefs_node()

2022-04-08 Thread Wei Yang
pgdat->node_zones + zone_type; >> -if (managed_zone(zone)) { >> +if (populated_zone(zone)) { >> zoneref_set_zone(zone, &zonerefs[nr_zones++]); >> check_highest_zone(zone_type); >> } > >Let's see if we have to find another way to properly handle fadump. > >Acked-by: David Hildenbrand Ok, I see the point. Reviewed-by: Wei Yang > >-- >Thanks, > >David / dhildenb -- Wei Yang Help you, Help me