Re: [PATCH v2 3/7] mm/memory_hotplug: prepare passing flags to add_memory() and friends

2020-09-09 Thread David Hildenbrand
On 09.09.20 13:37, David Hildenbrand wrote: > On 09.09.20 13:24, Michael Ellerman wrote: >> David Hildenbrand writes: >>> On 09.09.20 09:17, Greg Kroah-Hartman wrote: >>>> On Tue, Sep 08, 2020 at 10:10:08PM +0200, David Hildenbrand wrote: >>>>> We

Re: [PATCH v2 3/7] mm/memory_hotplug: prepare passing flags to add_memory() and friends

2020-09-09 Thread David Hildenbrand
On 09.09.20 13:24, Michael Ellerman wrote: > David Hildenbrand writes: >> On 09.09.20 09:17, Greg Kroah-Hartman wrote: >>> On Tue, Sep 08, 2020 at 10:10:08PM +0200, David Hildenbrand wrote: >>>> We soon want to pass flags, e.g., to mark added System RAM resources. &g

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

2020-09-09 Thread David Hildenbrand
On 09.09.20 09:16, Greg Kroah-Hartman wrote: > On Tue, Sep 08, 2020 at 10:10:07PM +0200, David Hildenbrand wrote: >> IORESOURCE_MEM_DRIVER_MANAGED currently uses an unused PnP bit, which is >> always set to 0 by hardware. This is far from beautiful (and confusing), >> and th

Re: [PATCH v2 3/7] mm/memory_hotplug: prepare passing flags to add_memory() and friends

2020-09-09 Thread David Hildenbrand
On 09.09.20 09:17, Greg Kroah-Hartman wrote: > On Tue, Sep 08, 2020 at 10:10:08PM +0200, David Hildenbrand wrote: >> We soon want to pass flags, e.g., to mark added System RAM resources. >> mergeable. Prepare for that. > > What are these random "flags", and how d

[PATCH v2 7/7] hv_balloon: try to merge system ram resources

2020-09-08 Thread David Hildenbrand
Wei Liu Cc: Pankaj Gupta Cc: Baoquan He Cc: Wei Yang Signed-off-by: David Hildenbrand --- drivers/hv/hv_balloon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c index 0194bed1a5736..b64d2efbefe71 100644 --- a/drivers/hv/hv_bal

[PATCH v2 5/7] virtio-mem: try to merge system ram resources

2020-09-08 Thread David Hildenbrand
resource up again. Cc: Andrew Morton Cc: Michal Hocko Cc: Dan Williams Cc: Michael S. Tsirkin Cc: Jason Wang Cc: Pankaj Gupta Cc: Baoquan He Cc: Wei Yang Signed-off-by: David Hildenbrand --- drivers/virtio/virtio_mem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a

[PATCH v2 6/7] xen/balloon: try to merge system ram resources

2020-09-08 Thread David Hildenbrand
Monné Cc: Julien Grall Cc: Pankaj Gupta Cc: Baoquan He Cc: Wei Yang Signed-off-by: David Hildenbrand --- drivers/xen/balloon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index 7bac38764513d..b57b2067ecbfb 100644 --- a/d

[PATCH v2 4/7] mm/memory_hotplug: MEMHP_MERGE_RESOURCE to specify merging of System RAM resources

2020-09-08 Thread David Hildenbrand
iyang 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: David Hildenbrand --- include/linux/ioport.h | 4 +++ include/linux/memory

[PATCH v2 0/7] mm/memory_hotplug: selective merging of system ram resources

2020-09-08 Thread David Hildenbrand
ecified to "merge_system_ram_resources(). - Smaller comment/documentation/patch description changes/fixes David Hildenbrand (7): kernel/resource: make release_mem_region_adjustable() never fail kernel/resource: move and rename IORESOURCE_MEM_DRIVER_MANAGED mm/memory_hotplug: prepare passing f

[PATCH v2 3/7] mm/memory_hotplug: prepare passing flags to add_memory() and friends

2020-09-08 Thread David Hildenbrand
g Zhang Cc: Stephen Hemminger Cc: Wei Liu Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: David Hildenbrand Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Cc: "Oliver O'Halloran" Cc: Pingfan

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

2020-09-08 Thread David Hildenbrand
iederman Cc: Thomas Gleixner Cc: Greg Kroah-Hartman Cc: ke...@lists.infradead.org Signed-off-by: David Hildenbrand --- include/linux/ioport.h | 4 +++- kernel/kexec_file.c| 2 +- mm/memory_hotplug.c| 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/linux/iopo

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

2020-09-08 Thread David Hildenbrand
nt context - let's add WARN_ON_ONCE() in these cases so we can catch them. 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: David Hildenbrand --- include/linu

Re: [PATCH v5 0/6] mm / virtio-mem: support ZONE_MOVABLE

2020-09-08 Thread David Hildenbrand
On 21.08.20 22:55, Andrew Morton wrote: > On Fri, 21 Aug 2020 10:45:33 +0200 David Hildenbrand wrote: > >> On 21.08.20 10:31, David Hildenbrand wrote: >>> On 16.08.20 14:53, David Hildenbrand wrote: >>>> For 5.10. Patch #1-#4,#6 have RBs or ACKs, patch #5 is vi

Re: [PATCH v1 5/5] hv_balloon: try to merge system ram resources

2020-09-08 Thread David Hildenbrand
On 04.09.20 19:30, Wei Liu wrote: > On Fri, Aug 21, 2020 at 12:34:31PM +0200, David Hildenbrand wrote: >> Let's use the new mechanism to merge system ram resources below the >> root. We are the only one hotplugging system ram, e.g., DIMMs don't apply, >> so th

Re: [PATCH v1 2/5] kernel/resource: merge_system_ram_resources() to merge resources after hotplug

2020-09-08 Thread David Hildenbrand
> Cc: Michal Hocko >> Cc: Dan Williams >> Cc: Jason Gunthorpe >> Cc: Kees Cook >> Cc: Ard Biesheuvel >> Cc: Thomas Gleixner >> Cc: "K. Y. Srinivasan" >> Cc: Haiyang Zhang >> Cc: Stephen Hemminger >> Cc: Wei Liu >> Cc: Bo

Re: [PATCH v1 4/5] xen/balloon: try to merge system ram resources

2020-09-02 Thread David Hildenbrand
> Am 02.09.2020 um 12:15 schrieb Jürgen Groß : > > On 21.08.20 12:34, David Hildenbrand wrote: >> Let's reuse the new mechanism to merge system ram resources below the >> root. We are the only one hotplugging system ram (e.g., DIMMs don't apply), >> so t

[PATCH v1 3/5] virtio-mem: try to merge system ram resources

2020-08-21 Thread David Hildenbrand
resource up again. Cc: Andrew Morton Cc: Michal Hocko Cc: Dan Williams Cc: Michael S. Tsirkin Cc: Jason Wang Cc: Pankaj Gupta Cc: Baoquan He Cc: Wei Yang Signed-off-by: David Hildenbrand --- drivers/virtio/virtio_mem.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions

[PATCH v1 4/5] xen/balloon: try to merge system ram resources

2020-08-21 Thread David Hildenbrand
Pau Monné Cc: Julien Grall Cc: Pankaj Gupta Cc: Baoquan He Cc: Wei Yang Signed-off-by: David Hildenbrand --- drivers/xen/balloon.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index 37ffccda8bb87..5ec73f752b8a7 100644 --- a/drivers/xen

[PATCH v1 5/5] hv_balloon: try to merge system ram resources

2020-08-21 Thread David Hildenbrand
Wei Liu Cc: Pankaj Gupta Cc: Baoquan He Cc: Wei Yang Signed-off-by: David Hildenbrand --- drivers/hv/hv_balloon.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c index 32e3bc0aa665a..49a6305f0fb73 100644 --- a/drivers/hv/hv_balloo

[PATCH v1 0/5] mm/memory_hotplug: selective merging of system ram resources

2020-08-21 Thread David Hildenbrand
RFC -> v1: - Switch from rather generic "merge_child_mem_resources()" where a resource name has to be specified to "merge_system_ram_resources(). - Smaller comment/documentation/patch description changes/fixes David Hildenbrand (5): kernel/resource: make release_mem_region_adj

[PATCH v1 2/5] kernel/resource: merge_system_ram_resources() to merge resources after hotplug

2020-08-21 Thread David Hildenbrand
: Juergen Gross Cc: Stefano Stabellini Cc: Roger Pau Monné Cc: Julien Grall Cc: Pankaj Gupta Cc: Baoquan He Cc: Wei Yang Signed-off-by: David Hildenbrand --- include/linux/ioport.h | 3 +++ kernel/resource.c | 52 ++ 2 files changed, 55 inse

[PATCH v1 1/5] kernel/resource: make release_mem_region_adjustable() never fail

2020-08-21 Thread David Hildenbrand
different context - let's add WARN_ON_ONCE(). 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: David Hildenbrand --- include/linux/ioport.h | 4 ++-- kernel/resou

Re: [PATCH v5 0/6] mm / virtio-mem: support ZONE_MOVABLE

2020-08-21 Thread David Hildenbrand
On 21.08.20 10:46, Baoquan He wrote: > On 08/21/20 at 10:31am, David Hildenbrand wrote: >> On 16.08.20 14:53, David Hildenbrand wrote: >>> For 5.10. Patch #1-#4,#6 have RBs or ACKs, patch #5 is virtio-mem stuff >>> maintained by me. This should go via the -mm tree. >

Re: [PATCH v5 0/6] mm / virtio-mem: support ZONE_MOVABLE

2020-08-21 Thread David Hildenbrand
On 21.08.20 10:31, David Hildenbrand wrote: > On 16.08.20 14:53, David Hildenbrand wrote: >> For 5.10. Patch #1-#4,#6 have RBs or ACKs, patch #5 is virtio-mem stuff >> maintained by me. This should go via the -mm tree. >> > > @Andrew, can we give this a churn if th

Re: [PATCH v5 0/6] mm / virtio-mem: support ZONE_MOVABLE

2020-08-21 Thread David Hildenbrand
On 16.08.20 14:53, David Hildenbrand wrote: > For 5.10. Patch #1-#4,#6 have RBs or ACKs, patch #5 is virtio-mem stuff > maintained by me. This should go via the -mm tree. > @Andrew, can we give this a churn if there are no further comments? Thanks! -- Thanks, David /

[PATCH v5 6/6] mm: document semantics of ZONE_MOVABLE

2020-08-16 Thread David Hildenbrand
Cc: Pankaj Gupta Cc: Baoquan He Signed-off-by: David Hildenbrand --- include/linux/mmzone.h | 35 +++ 1 file changed, 35 insertions(+) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index f6f884970511d..2456fcbaba152 100644 --- a/include/linux/mmzo

[PATCH v5 1/6] mm/page_alloc: tweak comments in has_unmovable_pages()

2020-08-16 Thread David Hildenbrand
Let's move the split comment regarding bootmem allocations and memory holes, especially in the context of ZONE_MOVABLE, to the PageReserved() check. Reviewed-by: Baoquan He Cc: Andrew Morton Cc: Michal Hocko Cc: Michael S. Tsirkin Cc: Mike Kravetz Cc: Pankaj Gupta Signed-off-by:

[PATCH v5 3/6] mm/page_isolation: drop WARN_ON_ONCE() in set_migratetype_isolate()

2020-08-16 Thread David Hildenbrand
htlb_alloc_mask()). Reviewed-by: Baoquan He Cc: Andrew Morton Cc: Michal Hocko Cc: Michael S. Tsirkin Cc: Mike Kravetz Cc: Pankaj Gupta Signed-off-by: David Hildenbrand --- mm/page_isolation.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/mm/page_i

[PATCH v5 5/6] virtio-mem: don't special-case ZONE_MOVABLE

2020-08-16 Thread David Hildenbrand
dy pinning pages within ZONE_MOVABLE for a longer time). Cc: Andrew Morton Cc: Michal Hocko Cc: Michael S. Tsirkin Cc: Jason Wang Cc: Mike Kravetz Cc: Pankaj Gupta Cc: Baoquan He Signed-off-by: David Hildenbrand --- drivers/virtio/virtio_mem.c | 47 +++

[PATCH v5 0/6] mm / virtio-mem: support ZONE_MOVABLE

2020-08-16 Thread David Hildenbrand
"[PATCH v1 5/6] mm/page_alloc: restrict ZONE_MOVABLE optimization in has_unmovable_pages() to memory offlining" by "mm: document semantics of ZONE_MOVABLE" -- Brain dump of what I know about ZONE_MOVABLE David Hildenbrand (6): mm/page_alloc: tweak comment

[PATCH v5 2/6] mm/page_isolation: exit early when pageblock is isolated in set_migratetype_isolate()

2020-08-16 Thread David Hildenbrand
Cc: Michal Hocko Cc: Michael S. Tsirkin Cc: Qian Cai Signed-off-by: David Hildenbrand --- mm/page_isolation.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/mm/page_isolation.c b/mm/page_isolation.c index f6d07c5f0d34d..7d7d263ce7f4b 100644 --- a/mm/page_isolati

[PATCH v5 4/6] mm/page_isolation: cleanup set_migratetype_isolate()

2020-08-16 Thread David Hildenbrand
Let's clean it up a bit, simplifying the exit paths. Reviewed-by: Baoquan He Reviewed-by: Pankaj Gupta Cc: Andrew Morton Cc: Michal Hocko Cc: Michael S. Tsirkin Cc: Mike Kravetz Signed-off-by: David Hildenbrand --- mm/page_isolation.c | 17 +++-- 1 file changed, 7 inser

Re: [PATCH v4 0/6] mm / virtio-mem: support ZONE_MOVABLE

2020-08-11 Thread David Hildenbrand
On 11.08.20 04:21, Andrew Morton wrote: > On Mon, 10 Aug 2020 09:56:32 +0200 David Hildenbrand wrote: > >> On 04.08.20 21:41, David Hildenbrand wrote: >>> @Andrew can we give this a churn and consider it for v5.9 in case there >>> are no more comments? >>

Re: [PATCH v3 35/38] virtio_mem: convert to LE accessors

2020-08-10 Thread David Hildenbrand
irtio_cread(vm->vdev, struct virtio_mem_config, region_size, > - &vm->region_size); > + virtio_cread_le(vm->vdev, struct virtio_mem_config, addr, &vm->addr); > + virtio_cread_le(vm->vdev, struct virtio_mem_config, region_size, > + &vm->region_size); > > /* >* We always hotplug memory in memory block granularity. This way, > Acked-by: David Hildenbrand -- Thanks, David / dhildenb ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH v4 0/6] mm / virtio-mem: support ZONE_MOVABLE

2020-08-10 Thread David Hildenbrand
On 04.08.20 21:41, David Hildenbrand wrote: > @Andrew can we give this a churn and consider it for v5.9 in case there > are no more comments? @Andrew, Ping, so I assume we'll target v5.10? > > Patch #1-#4,#6 have RBss or ACKs, patch #5 is virtio-mem stuff maintained > by

Re: [PATCH v2 4/6] mm/page_isolation: cleanup set_migratetype_isolate()

2020-08-06 Thread David Hildenbrand
On 06.08.20 15:35, Vlastimil Babka wrote: > On 7/30/20 11:34 AM, David Hildenbrand wrote: >> Let's clean it up a bit, simplifying error handling and getting rid of >> the label. > > Nit: the label was already removed by patch 1/6? > Ack, leftover from reshuffling

[PATCH v4 2/6] mm/page_alloc: tweak comments in has_unmovable_pages()

2020-08-04 Thread David Hildenbrand
Let's move the split comment regarding bootmem allocations and memory holes, especially in the context of ZONE_MOVABLE, to the PageReserved() check. Reviewed-by: Baoquan He Cc: Andrew Morton Cc: Michal Hocko Cc: Michael S. Tsirkin Cc: Mike Kravetz Cc: Pankaj Gupta Signed-off-by:

[PATCH v4 3/6] mm/page_isolation: drop WARN_ON_ONCE() in set_migratetype_isolate()

2020-08-04 Thread David Hildenbrand
htlb_alloc_mask()). Reviewed-by: Baoquan He Cc: Andrew Morton Cc: Michal Hocko Cc: Michael S. Tsirkin Cc: Mike Kravetz Cc: Pankaj Gupta Signed-off-by: David Hildenbrand --- mm/page_isolation.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/mm/page_i

[PATCH v4 5/6] virtio-mem: don't special-case ZONE_MOVABLE

2020-08-04 Thread David Hildenbrand
dy pinning pages within ZONE_MOVABLE for a longer time). Cc: Andrew Morton Cc: Michal Hocko Cc: Michael S. Tsirkin Cc: Jason Wang Cc: Mike Kravetz Cc: Pankaj Gupta Cc: Baoquan He Signed-off-by: David Hildenbrand --- drivers/virtio/virtio_mem.c | 47 +++

[PATCH v4 4/6] mm/page_isolation: cleanup set_migratetype_isolate()

2020-08-04 Thread David Hildenbrand
Let's clean it up a bit, simplifying error handling and getting rid of the label. Reviewed-by: Baoquan He Reviewed-by: Pankaj Gupta Cc: Andrew Morton Cc: Michal Hocko Cc: Michael S. Tsirkin Cc: Mike Kravetz Signed-off-by: David Hildenbrand --- mm/page_isolation.c | 17 +++

[PATCH v4 6/6] mm: document semantics of ZONE_MOVABLE

2020-08-04 Thread David Hildenbrand
Cc: Pankaj Gupta Cc: Baoquan He Signed-off-by: David Hildenbrand --- include/linux/mmzone.h | 35 +++ 1 file changed, 35 insertions(+) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index f6f884970511d..3c22aca6cc4f1 100644 --- a/include/linux/mmzo

[PATCH v4 1/6] mm/page_isolation: don't dump_page(NULL) in set_migratetype_isolate()

2020-08-04 Thread David Hildenbrand
ed-by: Baoquan He Reviewed-by: Pankaj Gupta Acked-by: Mike Kravetz Fixes: 4a55c0474a92 ("mm/hotplug: silence a lockdep splat with printk()") Cc: Andrew Morton Cc: Michal Hocko Cc: Michael S. Tsirkin Cc: Qian Cai Signed-off-by: David Hildenbrand --- mm/page_isolation.c | 9 +

[PATCH v4 0/6] mm / virtio-mem: support ZONE_MOVABLE

2020-08-04 Thread David Hildenbrand
ARN_ON_ONCE() in set_migratetype_isolate()" -- Keep curly braces on "else" case - Replace "[PATCH v1 5/6] mm/page_alloc: restrict ZONE_MOVABLE optimization in has_unmovable_pages() to memory offlining" by "mm: document semantics of ZONE_MOVABLE

Re: [PATCH v3 6/6] mm: document semantics of ZONE_MOVABLE

2020-08-04 Thread David Hildenbrand
On 04.08.20 12:03, Mike Rapoport wrote: > On Tue, Aug 04, 2020 at 11:55:10AM +0200, David Hildenbrand wrote: >> On 04.08.20 11:33, Mike Rapoport wrote: >>> On Tue, Aug 04, 2020 at 09:24:08AM +0200, David Hildenbrand wrote: >>>> Let's document what ZONE_MOVA

Re: [PATCH v3 6/6] mm: document semantics of ZONE_MOVABLE

2020-08-04 Thread David Hildenbrand
On 04.08.20 11:33, Mike Rapoport wrote: > On Tue, Aug 04, 2020 at 09:24:08AM +0200, David Hildenbrand wrote: >> Let's document what ZONE_MOVABLE means, how it's used, and which special >> cases we have regarding unmovable pages (memory offlining vs. migration / >>

[PATCH v3 6/6] mm: document semantics of ZONE_MOVABLE

2020-08-04 Thread David Hildenbrand
Baoquan He Signed-off-by: David Hildenbrand --- include/linux/mmzone.h | 34 ++ 1 file changed, 34 insertions(+) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index f6f884970511d..600d449e7d9e9 100644 --- a/include/linux/mmzone.h +++ b/include/linu

[PATCH v3 5/6] virtio-mem: don't special-case ZONE_MOVABLE

2020-08-04 Thread David Hildenbrand
ges within ZONE_MOVABLE for a longer time). Cc: Andrew Morton Cc: Michal Hocko Cc: Michael S. Tsirkin Cc: Jason Wang Cc: Mike Kravetz Cc: Pankaj Gupta Cc: Baoquan He Signed-off-by: David Hildenbrand --- drivers/virtio/virtio_mem.c | 47 +++-- 1 file changed, 8

[PATCH v3 1/6] mm/page_isolation: don't dump_page(NULL) in set_migratetype_isolate()

2020-08-04 Thread David Hildenbrand
ed-by: Baoquan He Reviewed-by: Pankaj Gupta Acked-by: Mike Kravetz Fixes: 4a55c0474a92 ("mm/hotplug: silence a lockdep splat with printk()") Cc: Andrew Morton Cc: Michal Hocko Cc: Michael S. Tsirkin Cc: Qian Cai Signed-off-by: David Hildenbrand --- mm/page_isolation.c | 9 +

[PATCH v3 4/6] mm/page_isolation: cleanup set_migratetype_isolate()

2020-08-04 Thread David Hildenbrand
Let's clean it up a bit, simplifying error handling and getting rid of the label. Reviewed-by: Baoquan He Reviewed-by: Pankaj Gupta Cc: Andrew Morton Cc: Michal Hocko Cc: Michael S. Tsirkin Cc: Mike Kravetz Signed-off-by: David Hildenbrand --- mm/page_isolation.c | 17 +++

[PATCH v3 3/6] mm/page_isolation: drop WARN_ON_ONCE() in set_migratetype_isolate()

2020-08-04 Thread David Hildenbrand
htlb_alloc_mask()). Reviewed-by: Baoquan He Cc: Andrew Morton Cc: Michal Hocko Cc: Michael S. Tsirkin Cc: Mike Kravetz Cc: Pankaj Gupta Signed-off-by: David Hildenbrand --- mm/page_isolation.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/mm/page_i

[PATCH v3 0/6] mm / virtio-mem: support ZONE_MOVABLE

2020-08-04 Thread David Hildenbrand
ATCH v1 5/6] mm/page_alloc: restrict ZONE_MOVABLE optimization in has_unmovable_pages() to memory offlining" by "mm: document semantics of ZONE_MOVABLE" -- Brain dump of what I know about ZONE_MOVABLE David Hildenbrand (6): mm/page_isolation: don't dump_page(

[PATCH v3 2/6] mm/page_alloc: tweak comments in has_unmovable_pages()

2020-08-04 Thread David Hildenbrand
Let's move the split comment regarding bootmem allocations and memory holes, especially in the context of ZONE_MOVABLE, to the PageReserved() check. Reviewed-by: Baoquan He Cc: Andrew Morton Cc: Michal Hocko Cc: Michael S. Tsirkin Cc: Mike Kravetz Cc: Pankaj Gupta Signed-off-by:

Re: [PATCH v2 05/24] virtio_balloon: correct tags for config space fields

2020-08-03 Thread David Hildenbrand
> Am 03.08.2020 um 22:59 schrieb Michael S. Tsirkin : > > Tag config space fields as having little endian-ness. > Note that balloon is special: LE even when using > the legacy interface. > > Signed-off-by: Michael S. Tsirkin Acked-by: David Hildenbrand >

Re: [PATCH v2 01/24] virtio_balloon: fix sparse warning

2020-08-03 Thread David Hildenbrand
I think I acked this one already. Acked-by: David Hildenbrand > --- > drivers/virtio/virtio_balloon.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c > index 54fd989f9353..8bc1704ffdf3 1006

Re: [PATCH v2 13/24] virtio_mem: correct tags for config space fields

2020-08-03 Thread David Hildenbrand
IRC, like this change. But we could do it (the spec documents everything as __le) in case it makes things clearer. Acked-by: David Hildenbrand > > Signed-off-by: Michael S. Tsirkin > --- > include/uapi/linux/virtio_mem.h | 14 +++--- > 1 file changed, 7 insertions(+), 7 de

Re: [PATCH RFCv1 3/5] virtio-mem: try to merge "System RAM (virtio_mem)" resources

2020-07-31 Thread David Hildenbrand
On 31.07.20 11:18, David Hildenbrand wrote: Grml, forgot to add cc: list for this patch, ccing the right people. > virtio-mem adds memory in memory block granularity, to be able to > remove it in the same granularity again later, and to grow slowly on > demand. This, however, results i

[PATCH RFCv1 1/5] kernel/resource: make release_mem_region_adjustable() never fail

2020-07-31 Thread David Hildenbrand
c: Dan Williams Cc: Jason Gunthorpe Cc: Kees Cook Cc: Ard Biesheuvel Cc: Wei Yang Signed-off-by: David Hildenbrand --- include/linux/ioport.h | 4 ++-- kernel/resource.c | 49 -- mm/memory_hotplug.c| 22 +-- 3 files changed

[PATCH RFCv1 3/5] virtio-mem: try to merge "System RAM (virtio_mem)" resources

2020-07-31 Thread David Hildenbrand
resource up again. Signed-off-by: David Hildenbrand --- drivers/virtio/virtio_mem.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/virtio/virtio_mem.c b/drivers/virtio/virtio_mem.c index f26f5f64ae822..2396a8d67875e 100644 --- a/drivers/virtio/virtio_mem.c

[PATCH RFCv1 5/5] hv_balloon:: try to merge "System RAM" resources

2020-07-31 Thread David Hildenbrand
ephen Hemminger Cc: Wei Liu Signed-off-by: David Hildenbrand --- drivers/hv/hv_balloon.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c index 32e3bc0aa665a..0745f7cc1727b 100644 --- a/drivers/hv/hv_balloon.c +++ b/drivers/hv/hv_b

[PATCH RFCv1 0/5] mm/memory_hotplug: selective merging of memory resources

2020-07-31 Thread David Hildenbrand
EABLE and extending our add_memory*() interfaces with a flag, specifying that merging after adding succeeded is acceptable. I'd like to avoid that complexity and code churn for now. David Hildenbrand (5): kernel/resource: make release_mem_region_adjustable() never fail kerne

[PATCH RFCv1 4/5] xen/balloon: try to merge "System RAM" resources

2020-07-31 Thread David Hildenbrand
llini Cc: Roger Pau Monné Cc: Julien Grall Signed-off-by: David Hildenbrand --- drivers/xen/balloon.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index 77c57568e5d7f..644ae2e3798e2 100644 --- a/drivers/xen/balloon.c +++ b/drivers/x

[PATCH RFCv1 2/5] kernel/resource: merge_child_mem_resources() to merge memory resources after adding succeeded

2020-07-31 Thread David Hildenbrand
nné Cc: Julien Grall Signed-off-by: David Hildenbrand --- include/linux/ioport.h | 3 +++ kernel/resource.c | 56 ++ 2 files changed, 59 insertions(+) diff --git a/include/linux/ioport.h b/include/linux/ioport.h index 52a91f5fa1a36..743b87fe2205b 10064

[PATCH v2 4/6] mm/page_isolation: cleanup set_migratetype_isolate()

2020-07-30 Thread David Hildenbrand
Let's clean it up a bit, simplifying error handling and getting rid of the label. Reviewed-by: Baoquan He Reviewed-by: Pankaj Gupta Cc: Andrew Morton Cc: Michal Hocko Cc: Michael S. Tsirkin Cc: Mike Kravetz Signed-off-by: David Hildenbrand --- mm/page_isolation.c | 17 +++

[PATCH v2 5/6] virtio-mem: don't special-case ZONE_MOVABLE

2020-07-30 Thread David Hildenbrand
ges within ZONE_MOVABLE for a longer time). Cc: Andrew Morton Cc: Michal Hocko Cc: Michael S. Tsirkin Cc: Jason Wang Cc: Mike Kravetz Cc: Pankaj Gupta Cc: Baoquan He Signed-off-by: David Hildenbrand --- drivers/virtio/virtio_mem.c | 47 +++-- 1 file changed, 8

[PATCH v2 3/6] mm/page_isolation: drop WARN_ON_ONCE() in set_migratetype_isolate()

2020-07-30 Thread David Hildenbrand
htlb_alloc_mask()). Reviewed-by: Baoquan He Cc: Andrew Morton Cc: Michal Hocko Cc: Michael S. Tsirkin Cc: Mike Kravetz Cc: Pankaj Gupta Signed-off-by: David Hildenbrand --- mm/page_isolation.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/mm/page_i

[PATCH v2 6/6] mm: document semantics of ZONE_MOVABLE

2020-07-30 Thread David Hildenbrand
Baoquan He Signed-off-by: David Hildenbrand --- include/linux/mmzone.h | 34 ++ 1 file changed, 34 insertions(+) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index f6f884970511d..b8c49b2aff684 100644 --- a/include/linux/mmzone.h +++ b/include/linu

[PATCH v2 2/6] mm/page_alloc: tweak comments in has_unmovable_pages()

2020-07-30 Thread David Hildenbrand
Let's move the split comment regarding bootmem allocations and memory holes, especially in the context of ZONE_MOVABLE, to the PageReserved() check. Reviewed-by: Baoquan He Cc: Andrew Morton Cc: Michal Hocko Cc: Michael S. Tsirkin Cc: Mike Kravetz Cc: Pankaj Gupta Signed-off-by:

[PATCH v2 0/6] mm / virtio-mem: support ZONE_MOVABLE

2020-07-30 Thread David Hildenbrand
N_ON_ONCE() in set_migratetype_isolate()" -- Keep curly braces on "else" case - Replace "[PATCH v1 5/6] mm/page_alloc: restrict ZONE_MOVABLE optimization in has_unmovable_pages() to memory offlining" by "mm: document semantics of ZONE_MOVABLE" -- Bra

[PATCH v2 1/6] mm/page_isolation: don't dump_page(NULL) in set_migratetype_isolate()

2020-07-30 Thread David Hildenbrand
ed-by: Baoquan He Reviewed-by: Pankaj Gupta Acked-by: Mike Kravetz Fixes: 4a55c0474a92 ("mm/hotplug: silence a lockdep splat with printk()") Cc: Andrew Morton Cc: Michal Hocko Cc: Michael S. Tsirkin Cc: Qian Cai Signed-off-by: David Hildenbrand --- mm/page_isolation.c | 9 +

Re: [PATCH v1 2/6] mm/page_isolation: don't dump_page(NULL) in set_migratetype_isolate()

2020-07-29 Thread David Hildenbrand
> Am 29.07.2020 um 20:36 schrieb Mike Kravetz : > > On 7/29/20 11:08 AM, David Hildenbrand wrote: >> I have no clue what you mean with "reintroducing this abandoning of >> pageblocks". All this patch is changing is not doing the dump_page() - >> or am I

Re: [PATCH v1 2/6] mm/page_isolation: don't dump_page(NULL) in set_migratetype_isolate()

2020-07-29 Thread David Hildenbrand
On 29.07.20 19:31, Mike Kravetz wrote: > On 6/30/20 7:26 AM, David Hildenbrand wrote: >> Right now, if we have two isolations racing, we might trigger the >> WARN_ON_ONCE() and to dump_page(NULL), dereferencing NULL. Let's just >> return directly. > > Just

Re: [PATCH v1 3/6] mm/page_isolation: drop WARN_ON_ONCE() in set_migratetype_isolate()

2020-07-29 Thread David Hildenbrand
On 29.07.20 15:24, Baoquan He wrote: > On 06/30/20 at 04:26pm, David Hildenbrand wrote: >> Inside has_unmovable_pages(), we have a comment describing how unmovable >> data could end up in ZONE_MOVABLE - via "movable_core". Also, besides >

Re: [PATCH v1 1/6] mm/page_alloc: tweak comments in has_unmovable_pages()

2020-07-29 Thread David Hildenbrand
On 29.07.20 12:47, Baoquan He wrote: > On 07/28/20 at 04:07pm, David Hildenbrand wrote: >> On 28.07.20 15:48, Baoquan He wrote: >>> On 06/30/20 at 04:26pm, David Hildenbrand wrote: >>>> Let's move the split comment regarding bootmem allocations and memory >&

Re: [PATCH v1 1/6] mm/page_alloc: tweak comments in has_unmovable_pages()

2020-07-28 Thread David Hildenbrand
On 28.07.20 15:48, Baoquan He wrote: > On 06/30/20 at 04:26pm, David Hildenbrand wrote: >> Let's move the split comment regarding bootmem allocations and memory >> holes, especially in the context of ZONE_MOVABLE, to the PageReserved() >> check. >> >> Cc: And

Re: [PATCH] virtio_balloon: fix up endian-ness for free cmd id

2020-07-27 Thread David Hildenbrand
;cmd_id_received_cache); > + /* Legacy balloon config space is LE, unlike all other devices. > */ > + if (!virtio_has_feature(vb->vdev, VIRTIO_F_VERSION_1)) > + vb->cmd_id_received_cache = le32_to_cpu((__force > __le32)vb->cmd_id_received_cache

Re: [PATCH v1 5/6] mm/page_alloc: restrict ZONE_MOVABLE optimization in has_unmovable_pages() to memory offlining

2020-07-27 Thread David Hildenbrand
On 30.06.20 16:26, David Hildenbrand wrote: > We can already have pages that can be offlined but not allocated in > ZONE_MOVABLE - PageHWPoison pages. While these pages can be skipped when > offlining ("moving them to /dev/null"), we cannot move them when > allocating. &

Re: [PATCH v1 0/6] mm / virtio-mem: support ZONE_MOVABLE

2020-07-21 Thread David Hildenbrand
On 30.06.20 16:26, David Hildenbrand wrote: > Currently, virtio-mem does not really support ZONE_MOVABLE. While it allows > to online fully plugged memory blocks to ZONE_MOVABLE, it does not allow > to online partially-plugged memory blocks to ZONE_MOVABLE and will never > consider

Re: [PATCH] virtio_balloon: clear modern features under legacy

2020-07-10 Thread David Hildenbrand
nform the hypervisor that our pages are poisoned or > * initialized. If we cannot do that then we should disable > Very right Acked-by: David Hildenbrand -- Thanks, David / dhildenb ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH] virtio_balloon: fix sparse warning

2020-07-10 Thread David Hildenbrand
v, > virtio_balloon_cmd_id_received(vb)); > sg_init_one(&sg, &vb->cmd_id_active, sizeof(vb->cmd_id_active)); > err = virtqueue_add_outbuf(vq, &sg, 1, &vb->cmd_id_active, GFP_KERNEL); > Reviewed-by: David Hildenbrand -- Than

[PATCH v1 1/6] mm/page_alloc: tweak comments in has_unmovable_pages()

2020-06-30 Thread David Hildenbrand
Let's move the split comment regarding bootmem allocations and memory holes, especially in the context of ZONE_MOVABLE, to the PageReserved() check. Cc: Andrew Morton Cc: Michal Hocko Cc: Michael S. Tsirkin Signed-off-by: David Hildenbrand --- mm/page_alloc.c | 22 ++--

[PATCH v1 2/6] mm/page_isolation: don't dump_page(NULL) in set_migratetype_isolate()

2020-06-30 Thread David Hildenbrand
ndrew Morton Cc: Michal Hocko Cc: Michael S. Tsirkin Signed-off-by: David Hildenbrand --- mm/page_isolation.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mm/page_isolation.c b/mm/page_isolation.c index f6d07c5f0d34d..553b49a34cf71 100644 --- a/mm/page_isolation.c +++

[PATCH v1 5/6] mm/page_alloc: restrict ZONE_MOVABLE optimization in has_unmovable_pages() to memory offlining

2020-06-30 Thread David Hildenbrand
ntig_range() on ZONE_MOVABLE. Note: We currently don't seem to have any user of alloc_contig_range() that actually uses ZONE_MOVABLE. This change is mostly valuable for the documentation. Cc: Andrew Morton Cc: Michal Hocko Cc: Michael S. Tsirkin Signed-off-by: David Hildenbrand ---

[PATCH v1 3/6] mm/page_isolation: drop WARN_ON_ONCE() in set_migratetype_isolate()

2020-06-30 Thread David Hildenbrand
htlb_alloc_mask()). Cc: Andrew Morton Cc: Michal Hocko Cc: Michael S. Tsirkin Signed-off-by: David Hildenbrand --- mm/page_isolation.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/mm/page_isolation.c b/mm/page_isolation.c index 553b49a34cf71..02a01bff6b2

[PATCH v1 0/6] mm / virtio-mem: support ZONE_MOVABLE

2020-06-30 Thread David Hildenbrand
y for virtio-mem optimizations, allowing more memory to get reliably unplugged. Cleanup has_unmovable_pages() and set_migratetype_isolate(), providing better documentation of how ZONE_MOVABLE interacts with different kind of unmovable pages (memory offlining vs. alloc_contig_range()). David Hilden

[PATCH v1 4/6] mm/page_isolation: cleanup set_migratetype_isolate()

2020-06-30 Thread David Hildenbrand
Let's clean it up a bit, simplifying error handling and getting rid of the label. Cc: Andrew Morton Cc: Michal Hocko Cc: Michael S. Tsirkin Signed-off-by: David Hildenbrand --- mm/page_isolation.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git

[PATCH v1 6/6] virtio-mem: don't special-case ZONE_MOVABLE

2020-06-30 Thread David Hildenbrand
anned, to deal with fragmentation after unplug due to memory chunks within memory blocks that could not get unplugged before (e.g., somebody pinning pages within ZONE_MOVABLE for a longer time). Cc: Andrew Morton Cc: Michal Hocko Cc: Michael S. Tsirkin Cc: Jason Wang Signed-off-by: David Hilden

Re: [PATCH v2 1/2] virtio: VIRTIO_F_IOMMU_PLATFORM -> VIRTIO_F_ACCESS_PLATFORM

2020-06-24 Thread David Hildenbrand
D 34 > diff --git a/tools/virtio/linux/virtio_config.h > b/tools/virtio/linux/virtio_config.h > index dbf14c1e2188..f99ae42668e0 100644 > --- a/tools/virtio/linux/virtio_config.h > +++ b/tools/virtio/linux/virtio_config.h > @@ -51,7 +51,7 @@ static inline bool virtio_has_iommu_quirk(const struct > virtio_device *vdev) >* Note the reverse polarity of the quirk feature (compared to most >* other features), this is for compatibility with legacy systems. >*/ > - return !virtio_has_feature(vdev, VIRTIO_F_IOMMU_PLATFORM); > + return !virtio_has_feature(vdev, VIRTIO_F_ACCESS_PLATFORM); > } > > static inline bool virtio_is_little_endian(struct virtio_device *vdev) > Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH] virtio-mem: Fix build error due to improper use 'select'

2020-06-19 Thread David Hildenbrand
TIO_MEM should not select CONTIG_ALLOC directly. > Otherwise it will cause an error: > https://bugzilla.kernel.org/show_bug.cgi?id=208245 Thanks! Acked-by: David Hildenbrand > > Signed-off-by: Weilong Chen > --- > drivers/virtio/Kconfig | 2 +- > 1 file changed, 1 inserti

[PATCH v1] MAINTAINERS: add URL for virtio-mem

2020-06-17 Thread David Hildenbrand
Let's add the status/info page, which is still under construction, however, already contains valuable documentation/information. Cc: "Michael S. Tsirkin" Cc: Pankaj Gupta Signed-off-by: David Hildenbrand --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [PATCH v1] virtio-mem: add memory via add_memory_driver_managed()

2020-06-11 Thread David Hildenbrand
> Am 11.06.2020 um 13:18 schrieb Michael S. Tsirkin : > > On Thu, Jun 11, 2020 at 01:00:24PM +0200, David Hildenbrand wrote: >>>> I'd like to have this patch in 5.8, with the initial merge of virtio-mem >>>> if possible (so the user space rep

Re: [PATCH v1] virtio-mem: add memory via add_memory_driver_managed()

2020-06-11 Thread David Hildenbrand
>> I'd like to have this patch in 5.8, with the initial merge of virtio-mem >> if possible (so the user space representation of virtio-mem added memory >> resources won't change anymore). > > So my plan is to rebase on top of -rc1 and merge this for rc2 then. > I don't like rebase on top of tip as

Re: [PATCH v1] virtio-mem: add memory via add_memory_driver_managed()

2020-06-11 Thread David Hildenbrand
On 11.06.20 12:32, Pankaj Gupta wrote: >> Virtio-mem managed memory is always detected and added by the virtio-mem >> driver, never using something like the firmware-provided memory map. >> This is the case after an ordinary system reboot, and has to be guaranteed >> after kexec. Especially, virtio

[PATCH v1] virtio-mem: add memory via add_memory_driver_managed()

2020-06-11 Thread David Hildenbrand
stem RAM (virtio_mem) 34800-34fff : System RAM (virtio_mem) [...] Cc: "Michael S. Tsirkin" Cc: Pankaj Gupta Cc: teawater Signed-off-by: David Hildenbrand --- Based on latest Linus' tree (and not a tag) because - virtio-mem has just been merged via the vhost tree

Re: [PATCH] virtio-mem: silence a static checker warning

2020-06-10 Thread David Hildenbrand
eral is cleaner and > silence the static checker warning. > Right, it‘s impossible in real life. Thanks! Acked-by: David Hildenbrand > Signed-off-by: Dan Carpenter > --- > drivers/virtio/virtio_mem.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff -

Re: [PATCH 15/17] mm: Fix trivial spelling

2020-06-09 Thread David Hildenbrand
On 09.06.20 14:46, Kieran Bingham wrote: > The word 'descriptor' is misspelled throughout the tree. > "mm/balloon_compaction:" is a better subject prefix Reviewed-by: David Hildenbrand > Fix it up accordingly: > decriptors -> descriptors > > Signe

Re: [PATCH] virtio_mem: fix printk format

2020-06-09 Thread David Hildenbrand
dev_info(&vm->vdev->dev, "subblock size: 0x%llx", > + (unsigned long long)vm->subblock_size); > if (vm->nid != NUMA_NO_NODE) > dev_info(&vm->vdev->dev, "nid: %d", vm->nid); > > Acked-by: Dav

Re: [PATCH] virtio_mem: prevent overflow with subblock size

2020-06-08 Thread David Hildenbrand
On 08.06.20 09:12, teawater wrote: > > >> 2020年6月8日 14:58,David Hildenbrand 写道: >> >> On 08.06.20 08:14, Michael S. Tsirkin wrote: >>> If subblock size is large (e.g. 1G) 32 bit math involving it >>> can overflow. Rather than try to catch all instances

Re: [PATCH] virtio_mem: prevent overflow with subblock size

2020-06-08 Thread David Hildenbrand
On 08.06.20 09:08, Michael S. Tsirkin wrote: > On Mon, Jun 08, 2020 at 08:58:31AM +0200, David Hildenbrand wrote: >> On 08.06.20 08:14, Michael S. Tsirkin wrote: >>> If subblock size is large (e.g. 1G) 32 bit math involving it >>> can overflow. Rather than try to

Re: [PATCH] virtio_mem: prevent overflow with subblock size

2020-06-07 Thread David Hildenbrand
On 08.06.20 08:14, Michael S. Tsirkin wrote: > If subblock size is large (e.g. 1G) 32 bit math involving it > can overflow. Rather than try to catch all instances of that, > let's tweak block size to 64 bit. I fail to see where we could actually trigger an overflow. The reported warning looked lik

Re: [PATCH] virtio-mem: drop unnecessary initialization

2020-06-07 Thread David Hildenbrand
!= 24); > BUILD_BUG_ON(sizeof(struct virtio_mem_resp) != 10); > Acked-by: David Hildenbrand -- Thanks, David / dhildenb ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

<    1   2   3   4   5   6   7   8   9   >