On 19.11.21 14:36, David Hildenbrand wrote:
> On 19.11.21 08:22, David Stevens wrote:
>> On Thu, Nov 18, 2021 at 8:17 PM David Hildenbrand wrote:
>>>
>>> On 18.11.21 10:11, David Stevens wrote:
>>>> From: David Stevens
>>>
>>> Hi David
On 19.11.21 08:22, David Stevens wrote:
> On Thu, Nov 18, 2021 at 8:17 PM David Hildenbrand wrote:
>>
>> On 18.11.21 10:11, David Stevens wrote:
>>> From: David Stevens
>>
>> Hi David,
>>
>>>
>>> Add a module parameters to virtio_ball
On 18.11.21 10:11, David Stevens wrote:
> From: David Stevens
Hi David,
>
> Add a module parameters to virtio_balloon to allow specifying whether or
> not the driver should call adjust_managed_page_count. If the parameter
> is set, it overrides the default behavior inferred from the deflate on
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
> of
> MAX_ORDER - 1 and get rid of MAX_ORDER - 1 dependency in virtio_mem[1]. This
> patchset is my attempt to
On 10.11.21 17:37, David Hildenbrand wrote:
> Hi Linus,
>
> usually this would have went via the vhost tree, but as this patch depends
> on some patches that just went in via Andrews tree and MST doesn't have
> any other patches for this merge window, I'm sending it my
On Thu, Nov 11, 2021 at 11:49 PM Luis Chamberlain wrote:
>
> I get the following splats with a kvm guest in idle, after a few seconds
> it starts:
>
> [ 242.412806] INFO: task kworker/6:2:271 blockedfor more than 120 seconds.
> [ 242.415790] Tainted: GE
quired
by some hypervisors implementing virtio-mem in the near future, so let's
support it now that we safely can.
Signed-off-by: David Hildenbrand
--------
David Hildenbrand (1):
virtio-mem: support VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE
d
On 13.10.21 14:17, Michael S. Tsirkin wrote:
> On Wed, Oct 13, 2021 at 01:03:46PM +0200, David Hildenbrand wrote:
>> On 13.10.21 12:55, Michael S. Tsirkin wrote:
>>> This will enable cleanups down the road.
>>> The idea is to disable cbs, then add "flush_queued_
On 13.10.21 12:55, Michael S. Tsirkin wrote:
This will enable cleanups down the road.
The idea is to disable cbs, then add "flush_queued_cbs" callback
as a parameter, this way drivers can flush any work
queued after callbacks have been disabled.
Signed-off-by: Michael S. Tsirkin
---
On 07.10.21 11:15, Oscar Salvador wrote:
On Wed, Sep 29, 2021 at 04:36:00PM +0200, David Hildenbrand wrote:
CONFIG_MEMORY_HOTPLUG was marked BROKEN over one year and we just
restricted it to 64 bit. Let's remove the unused x86 32bit implementation
and simplify the Kconfig.
Signed-off-by: David
c: Cornelia Huck
Cc: Marek Kedzierski
Cc: Hui Zhu
Cc: Sebastien Boeuf
Cc: Pankaj Gupta
Cc: Wei Yang
Signed-off-by: David Hildenbrand
---
Michael, I want this patch in v5.16 if the following two series that
are already queued by Andrew via the -MM tree go into v5.16 (which I
I assume but we never
" when creating the vmcore header) and
a recent dracut version (including the virtio_mem module in the kdump
initrd).
[1] https://lkml.kernel.org/r/20210526093041.8800-1-da...@redhat.com
[2] https://github.com/dracutdevs/dracut/pull/1157
Signed-off-by: David Hildenbrand
---
drivers/virti
Let's prepare for a new virtio-mem kdump mode in which we don't actually
hot(un)plug any memory but only observe the state of device blocks.
Signed-off-by: David Hildenbrand
---
drivers/virtio/virtio_mem.c | 13 ++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git
Let's prepare for a new virtio-mem kdump mode in which we don't actually
hot(un)plug any memory but only observe the state of device blocks.
Signed-off-by: David Hildenbrand
---
drivers/virtio/virtio_mem.c | 87 +++--
1 file changed, 45 insertions(+), 42
Let's prepare for a new virtio-mem kdump mode in which we don't actually
hot(un)plug any memory but only observe the state of device blocks.
Signed-off-by: David Hildenbrand
---
drivers/virtio/virtio_mem.c | 81 -
1 file changed, 44 insertions(+), 37
a callback after the vmcore has already been
opened (warn and essentially read only zeroes from that point on).
Signed-off-by: David Hildenbrand
---
arch/x86/kernel/aperture_64.c | 13 -
arch/x86/xen/mmu_hvm.c| 11 ++--
fs/proc/vmcore.c | 99
The callback should deal with errors internally, it doesn't make sense to
expose these via pfn_is_ram(). We'll rework the callbacks next. Right now
we consider errors as if "it's RAM"; no functional change.
Signed-off-by: David Hildenbrand
---
fs/proc/vmcore.c | 8
1 file
Ostrovsky
Signed-off-by: David Hildenbrand
---
arch/x86/xen/mmu_hvm.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/x86/xen/mmu_hvm.c b/arch/x86/xen/mmu_hvm.c
index d1b38c77352b..6ba8826dcdcc 100644
--- a/arch/x86/xen/mmu_hvm.c
+++ b/arch/x86/xen/mmu_hvm.c
@@ -22,8 +22,10
Let's simplify return handling.
Signed-off-by: David Hildenbrand
---
arch/x86/xen/mmu_hvm.c | 15 +--
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/arch/x86/xen/mmu_hvm.c b/arch/x86/xen/mmu_hvm.c
index b242d1f4b426..d1b38c77352b 100644
--- a/arch/x86/xen/mmu_hvm.c
The callback is only used for the vmcore nowadays.
Reviewed-by: Boris Ostrovsky
Signed-off-by: David Hildenbrand
---
arch/x86/xen/mmu_hvm.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/arch/x86/xen/mmu_hvm.c b/arch/x86/xen/mmu_hvm.c
index 57409373750f
c: Vivek Goyal
Cc: Michal Hocko
Cc: Oscar Salvador
Cc: Mike Rapoport
Cc: "Rafael J. Wysocki"
Cc: x...@kernel.org
Cc: xen-de...@lists.xenproject.org
Cc: virtualization@lists.linux-foundation.org
Cc: ke...@lists.infradead.org
Cc: linux-fsde...@vger.kernel.org
Cc: linux
On 29.09.21 16:22, Boris Ostrovsky wrote:
On 9/29/21 5:03 AM, David Hildenbrand wrote:
On 29.09.21 10:45, David Hildenbrand wrote:
Can we go one step further and do
@@ -20,24 +20,11 @@ static int xen_oldmem_pfn_is_ram(unsigned long pfn)
struct xen_hvm_get_mem_type
CONFIG_MEMORY_HOTPLUG was marked BROKEN over one year and we just
restricted it to 64 bit. Let's remove the unused x86 32bit implementation
and simplify the Kconfig.
Signed-off-by: David Hildenbrand
---
arch/x86/Kconfig | 6 +++---
arch/x86/mm/init_32.c | 31
These functions no longer exist.
Signed-off-by: David Hildenbrand
---
include/linux/memory_hotplug.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h
index e5a867c950b2..be48e003a518 100644
--- a/include/linux/memory_hotplug.h
We don't support CONFIG_MEMORY_HOTPLUG on 32 bit and consequently not
HIGHMEM. Let's remove any leftover code -- including the unused
"status_change_nid_high" field part of the memory notifier.
Signed-off-by: David Hildenbrand
---
Documentation/core-api/memory-hotplug.rst | 3 --
me HIGHMEM leftovers from memory hotplug code to clean up.
Signed-off-by: David Hildenbrand
---
mm/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/Kconfig b/mm/Kconfig
index ea8762cd8e1e..88273dd5c6d6 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -125,7 +125,7 @@ c
CONFIG_MEMORY_HOTPLUG depends on CONFIG_SPARSEMEM, so there is no need for
CONFIG_MEMORY_HOTPLUG_SPARSE anymore; adjust all instances to use
CONFIG_MEMORY_HOTPLUG and remove CONFIG_MEMORY_HOTPLUG_SPARSE.
Signed-off-by: David Hildenbrand
---
arch/powerpc/include/asm/machdep.h| 2
def_bool y
depends on X86_64 && NUMA && ACPI && PCI
Let's just remove the CONFIG_X86_64_ACPI_NUMA dependency, as it does no
longer make sense.
Signed-off-by: David Hildenbrand
---
mm/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
chal Hocko
Cc: Oscar Salvador
Cc: Mike Rapoport
Cc: x...@kernel.org
Cc: linux...@kvack.org
Cc: linux-kselft...@vger.kernel.org
Cc: linux-...@vger.kernel.org
Cc: linuxppc-...@lists.ozlabs.org
Cc: virtualization@lists.linux-foundation.org
David Hildenbrand (6):
mm/memory_hotplug: remove CONFIG_X8
On 29.09.21 10:45, David Hildenbrand wrote:
How about
return a.mem_type != HVMMEM_mmio_dm;
Ha, how could I have missed that :)
Result should be promoted to int and this has added benefit of not requiring
changes in patch 4.
Can we go one step further and do
@@ -20,24 +20,11
How about
return a.mem_type != HVMMEM_mmio_dm;
Ha, how could I have missed that :)
Result should be promoted to int and this has added benefit of not requiring
changes in patch 4.
Can we go one step further and do
@@ -20,24 +20,11 @@ static int xen_oldmem_pfn_is_ram(unsigned
[...]
+
+static bool virtio_mem_vmcore_pfn_is_ram(struct vmcore_cb *cb,
+unsigned long pfn)
+{
+ struct virtio_mem *vm = container_of(cb, struct virtio_mem,
+vmcore_cb);
+ uint64_t addr =
" when creating the vmcore header) and
a recent dracut version (including the virtio_mem module in the kdump
initrd).
[1] https://lkml.kernel.org/r/20210526093041.8800-1-da...@redhat.com
[2] https://github.com/dracutdevs/dracut/pull/1157
Signed-off-by: David Hildenbrand
---
drivers/virti
Let's prepare for a new virtio-mem kdump mode in which we don't actually
hot(un)plug any memory but only observe the state of device blocks.
Signed-off-by: David Hildenbrand
---
drivers/virtio/virtio_mem.c | 13 ++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git
Let's prepare for a new virtio-mem kdump mode in which we don't actually
hot(un)plug any memory but only observe the state of device blocks.
Signed-off-by: David Hildenbrand
---
drivers/virtio/virtio_mem.c | 87 +++--
1 file changed, 45 insertions(+), 42
Let's prepare for a new virtio-mem kdump mode in which we don't actually
hot(un)plug any memory but only observe the state of device blocks.
Signed-off-by: David Hildenbrand
---
drivers/virtio/virtio_mem.c | 81 -
1 file changed, 44 insertions(+), 37
a callback after the vmcore has already been
opened (warn and essentially read only zeroes from that point on).
Signed-off-by: David Hildenbrand
---
arch/x86/kernel/aperture_64.c | 13 -
arch/x86/xen/mmu_hvm.c| 15 +++---
fs/proc/vmcore.c | 99
The callback should deal with errors internally, it doesn't make sense to
expose these via pfn_is_ram(). We'll rework the callbacks next. Right now
we consider errors as if "it's RAM"; no functional change.
Signed-off-by: David Hildenbrand
---
fs/proc/vmcore.c | 8
1 file
Let's simplify return handling.
Signed-off-by: David Hildenbrand
---
arch/x86/xen/mmu_hvm.c | 11 ++-
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/arch/x86/xen/mmu_hvm.c b/arch/x86/xen/mmu_hvm.c
index b242d1f4b426..eb61622df75b 100644
--- a/arch/x86/xen/mmu_hvm.c
+++ b
The callback is only used for the vmcore nowadays.
Signed-off-by: David Hildenbrand
---
arch/x86/xen/mmu_hvm.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/arch/x86/xen/mmu_hvm.c b/arch/x86/xen/mmu_hvm.c
index 57409373750f..b242d1f4b426 100644
--- a/arch/x86/xen
ang
Cc: Dave Young
Cc: Baoquan He
Cc: Vivek Goyal
Cc: Michal Hocko
Cc: Oscar Salvador
Cc: Mike Rapoport
Cc: "Rafael J. Wysocki"
Cc: x...@kernel.org
Cc: xen-de...@lists.xenproject.org
Cc: virtualization@lists.linux-foundation.org
Cc: ke...@lists.infradead.org
Cc: linux-fsde...@
cannot be restricticted --
if we have CONFIG_DEVMEM=y but CONFIG_STRICT_DEVMEM is not set.
Reviewed-by: Dan Williams
Acked-by: Michael S. Tsirkin
Signed-off-by: David Hildenbrand
---
drivers/virtio/Kconfig | 1 +
drivers/virtio/virtio_mem.c | 4 +++-
2 files changed, 4 insertions(+), 1
ly because the parent
range is not of interest.
Reviewed-by: Dan Williams
Signed-off-by: David Hildenbrand
---
kernel/resource.c | 25 -
1 file changed, 20 insertions(+), 5 deletions(-)
diff --git a/kernel/resource.c b/kernel/resource.c
index ca9f5198a01f..2999f57da
no applicable ranges and we'll modify virtio-mem next to
properly set IORESOURCE_EXCLUSIVE on the parent resource container it
creates to contain all actual busy system RAM added via
add_memory_driver_managed().
Reviewed-by: Dan Williams
Signed-off-by: David Hildenbrand
---
kernel/resource.c | 29
Cc: Andrew Morton
Cc: Dan Williams
Cc: Hanjun Guo
Cc: Andy Shevchenko
Cc: virtualization@lists.linux-foundation.org
Cc: linux...@kvack.org
David Hildenbrand (3):
kernel/resource: clean up and optimize iomem_is_exclusive()
kernel/resource: disallow access to exclusive system RAM regions
On 14.09.21 13:52, Michael S. Tsirkin wrote:
On Tue, Sep 14, 2021 at 11:45:25AM +0200, David Hildenbrand wrote:
On 03.09.21 09:02, Michael S. Tsirkin wrote:
On Thu, Sep 02, 2021 at 06:09:19PM +0200, David Hildenbrand wrote:
We don't want user space to be able to map virtio-mem device memory
On 03.09.21 09:02, Michael S. Tsirkin wrote:
On Thu, Sep 02, 2021 at 06:09:19PM +0200, David Hildenbrand wrote:
We don't want user space to be able to map virtio-mem device memory
directly (e.g., via /dev/mem) in order to have guarantees that in a sane
setup we'll never accidentially access
cannot be restricticted --
if we have CONFIG_DEVMEM=y but CONFIG_STRICT_DEVMEM is not set.
Reviewed-by: Dan Williams
Signed-off-by: David Hildenbrand
---
drivers/virtio/Kconfig | 1 +
drivers/virtio/virtio_mem.c | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers
e container it
creates to contain all actual busy system RAM added via
add_memory_driver_managed().
Reviewed-by: Dan Williams
Signed-off-by: David Hildenbrand
---
kernel/resource.c | 29 +++--
1 file changed, 19 insertions(+), 10 deletions(-)
diff --git a/kernel/resource.c b/
We end up traversing subtrees of ranges we are not interested in; let's
optimize this case, skipping such subtrees, cleaning up the function a bit.
Reviewed-by: Dan Williams
Signed-off-by: David Hildenbrand
---
kernel/resource.c | 25 -
1 file changed, 20 insertions
h-Hartman
Cc: "Michael S. Tsirkin"
Cc: Jason Wang
Cc: "Rafael J. Wysocki"
Cc: Andrew Morton
Cc: Dan Williams
Cc: Hanjun Guo
Cc: Andy Shevchenko
Cc: virtualization@lists.linux-foundation.org
Cc: linux...@kvack.org
David Hildenbrand (3):
kernel/resource: clean up and
ocki"
Cc: Andrew Morton
Cc: Dan Williams
Cc: Hanjun Guo
Cc: Andy Shevchenko
Cc: virtualization@lists.linux-foundation.org
Cc: linux...@kvack.org
David Hildenbrand (3):
kernel/resource: clean up and optimize iomem_is_exclusive()
kernel/resource: disallow access to exclusive system RAM
On 29.08.21 20:11, Linus Torvalds wrote:
On Sun, Aug 29, 2021 at 8:53 AM Michael S. Tsirkin wrote:
Donnu if it's too late - was on vacation and this only arrived
Wednesday. Seems to be necessary to avoid introducing a regression
in virtio-mem.
Heh. Not too late for 5.14, but too late in the
On 25.08.21 19:07, Dan Williams wrote:
On Wed, Aug 25, 2021 at 12:23 AM David Hildenbrand wrote:
On 25.08.21 02:58, Dan Williams wrote:
On Mon, Aug 16, 2021 at 7:25 AM David Hildenbrand wrote:
virtio-mem dynamically exposes memory inside a device memory region as
system RAM to Linux
()
Cc: "Michael S. Tsirkin"
Cc: Jason Wang
Cc: Andrew Morton
Cc: Linus Torvalds
Cc: virtualization@lists.linux-foundation.org
Signed-off-by: David Hildenbrand
---
The problematic commit is in v5.14-rc1 .. v5.14-rc7, but it suspect
might be too late for v5.14.
The original commit we
On 25.08.21 11:40, Dan Carpenter wrote:
Hello David Hildenbrand,
The patch 6cc26d77613a: "virtio-mem: use page_offline_(start|end)
when setting PageOffline()" from Jun 30, 2021, leads to the following
Smatch static checker warning:
drivers/virtio/virtio_
On 25.08.21 02:58, Dan Williams wrote:
On Mon, Aug 16, 2021 at 7:25 AM David Hildenbrand wrote:
virtio-mem dynamically exposes memory inside a device memory region as
system RAM to Linux, coordinating with the hypervisor which parts are
actually "plugged" and consequently usable/
On 16.08.21 16:25, David Hildenbrand wrote:
Let's add the basic infrastructure to exclude some physical memory
regions completely from /dev/mem access, on any architecture and under
any system configuration (independent of CONFIG_STRICT_DEVMEM and
independent of "iomem=").
Use it for
Let's clean it up a bit, reusing for_each_resource() and avoiding
traversing subtrees we are not interested in.
Signed-off-by: David Hildenbrand
---
kernel/resource.c | 13 -
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/kernel/resource.c b/kernel/resource.c
index
against someone that just wants to do nasty things.
Signed-off-by: David Hildenbrand
---
drivers/virtio/virtio_mem.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/virtio/virtio_mem.c b/drivers/virtio/virtio_mem.c
index 09ed55de07d7..c8f914700a42 100644
t's add and use
next_range_skip_children() and for_each_resource(), to optimize that case,
avoding having to traverse subtrees that are not of interest.
Signed-off-by: David Hildenbrand
---
drivers/char/mem.c | 22
include/linux/ioport.h | 1 +
kernel/resource.c | 47 +++
Cc: Andy Shevchenko
Cc: virtualization@lists.linux-foundation.org
Cc: linux...@kvack.org
David Hildenbrand (3):
/dev/mem: disallow access to explicitly excluded system RAM regions
virtio-mem: disallow mapping virtio-mem memory via /dev/mem
kernel/resource: cleanup and optimize io
On 12.08.21 09:14, Andy Shevchenko wrote:
On Thursday, August 12, 2021, David Hildenbrand <mailto:da...@redhat.com>> wrote:
On 11.08.21 22:47, Andy Shevchenko wrote:
On Wednesday, August 11, 2021, David Hildenbrand
mailto:da...@redhat.com>
On 11.08.21 22:47, Andy Shevchenko wrote:
On Wednesday, August 11, 2021, David Hildenbrand <mailto:da...@redhat.com>> wrote:
Let's clean it up a bit, removing the unnecessary usage of r_next() by
next_resource(), and use next_range_resource() in case we are not
i
Let's clean it up a bit, removing the unnecessary usage of r_next() by
next_resource(), and use next_range_resource() in case we are not
interested in a certain subtree.
Signed-off-by: David Hildenbrand
---
kernel/resource.c | 19 +++
1 file changed, 11 insertions(+), 8
e
next_range_skip_children() to optimize that case, avoding having to
traverse subtrees that are not of interest.
Signed-off-by: David Hildenbrand
---
drivers/char/mem.c | 22 +-
include/linux/ioport.h | 1 +
kernel/resource.c | 42 +++
against someone that just wants to do nasty things.
Signed-off-by: David Hildenbrand
---
drivers/virtio/virtio_mem.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/virtio/virtio_mem.c b/drivers/virtio/virtio_mem.c
index 09ed55de07d7..c8f914700a42 100644
linux-foundation.org
Cc: linux...@kvack.org
David Hildenbrand (3):
/dev/mem: disallow access to explicitly excluded system RAM regions
virtio-mem: disallow mapping virtio-mem memory via /dev/mem
kernel/resource: cleanup and optimize iomem_is_exclusive()
drivers/char/mem.c | 22 ++--
On 05.08.21 21:02, Zi Yan wrote:
From: Zi Yan
It keeps the existing behavior when MAX_ORDER grows beyond a section.
... but it breaks/changes existing behavior if MAX_ORDER is smaller than
a section?
Signed-off-by: Zi Yan
Cc: "Michael S. Tsirkin"
Cc: David Hildenbrand
Cc:
On 05.08.21 21:02, Zi Yan wrote:
From: Zi Yan
It keeps the existing behavior when MAX_ORDER grows beyond a section
size.
Signed-off-by: Zi Yan
Cc: David Hildenbrand
Cc: "Michael S. Tsirkin"
Cc: Jason Wang
Cc: virtualization@lists.linux-foundation.org
Cc: linux...@kvack.org
Cc:
all number of NUMA
nodes.
Note: for now, there seems to be no compelling reason to make this
behavior configurable.
Signed-off-by: David Hildenbrand
---
drivers/base/memory.c | 30 +
include/linux/memory.h | 3 +++
mm/memory_hotplug.c| 60 +++
ihin a 512 MiB unit will either be MOVABLE or not, not
a mixture.
We have to pass the memory group to zone_for_pfn_range() to take the
memory group into account.
Note: for now, there seems to be no compelling reason to make this
behavior configurable.
Signed-off-by: David Hildenbrand
---
dr
Let's use a single dynamic memory group.
Signed-off-by: David Hildenbrand
---
drivers/virtio/virtio_mem.c | 22 +++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/drivers/virtio/virtio_mem.c b/drivers/virtio/virtio_mem.c
index 774986695dc4..8945f248ce69 100644
memory device.
Signed-off-by: David Hildenbrand
---
drivers/dax/kmem.c | 40
1 file changed, 32 insertions(+), 8 deletions(-)
diff --git a/drivers/dax/kmem.c b/drivers/dax/kmem.c
index 99e0f60c4c26..a37622060fff 100644
--- a/drivers/dax/kmem.c
+++ b/drivers
fail acpi_memory_enable_device().
Acked-by: Rafael J. Wysocki
Signed-off-by: David Hildenbrand
---
drivers/acpi/acpi_memhotplug.c | 35 +-
1 file changed, 30 insertions(+), 5 deletions(-)
diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi
smart auto-online decision for individual memory blocks within a
memory group based on group statistics.
Signed-off-by: David Hildenbrand
---
drivers/base/memory.c | 10 +-
include/linux/memory.h | 6 ++
include/linux/memory_hotplug.h | 13 +
mm
We want a single unit to be of the same type.
For now, memory groups are an internal concept that is not exposed to
user space; we might want to change that in the future, though.
add_memory() users can specify a mgid instead of a nid when passing
the MHP_NID_IS_MGID flag.
Signed-off-by: David
en enabling
the new "auto-movable" policy, though.
* memory_hotplug.auto_movable_numa_aware considers numa node stats in
addition to global stats, and defaults to "true".
Note: just like the old policy, the new policy won't take things like
unmovable huge pages or memo
only online/offline complete (individual)
memory blocks.
Signed-off-by: David Hildenbrand
---
drivers/base/memory.c | 14 +++---
include/linux/memory_hotplug.h | 2 +-
include/linux/mmzone.h | 7 +++
mm/memory_hotplug.c| 14 +++---
mm/page_alloc.c
foundation.org
Cc: linux...@kvack.org
Cc: linux-a...@vger.kernel.org
[1] https://lkml.kernel.org/r/20210707073205.3835-1-da...@redhat.com
[2] https://lkml.kernel.org/r/20210712124052.26491-1-da...@redhat.com
David Hildenbrand (9):
mm: track present early pages per zone
mm/memory_hotplug: introdu
Hi Greg,
static void unregister_memory(struct memory_block *memory)
@@ -681,6 +692,11 @@ static void unregister_memory(struct memory_block *memory)
WARN_ON(xa_erase(_blocks, memory->dev.id) == NULL);
+ if (memory->group) {
+ refcount_dec(>group->refcount);
+
+struct auto_movable_stats {
+ unsigned long kernel_early_pages;
+ unsigned long movable_pages;
+};
+
+static void auto_movable_stats_account_zone(struct auto_movable_stats *stats,
+ struct zone *zone)
+{
+ if (zone_idx(zone) ==
all number of NUMA
nodes.
Note: for now, there seems to be no compelling reason to make this
behavior configurable.
Signed-off-by: David Hildenbrand
---
drivers/base/memory.c | 25 ++
include/linux/memory.h | 3 +++
mm/memory_hotplug.c| 60 +++
ihin a 512 MiB unit will either be MOVABLE or not, not
a mixture.
We have to pass the memory group to zone_for_pfn_range() to take the
memory group into account.
Note: for now, there seems to be no compelling reason to make this
behavior configurable.
Signed-off-by: David Hildenbrand
---
dr
Let's use a single dynamic memory group.
Signed-off-by: David Hildenbrand
---
drivers/virtio/virtio_mem.c | 22 +++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/drivers/virtio/virtio_mem.c b/drivers/virtio/virtio_mem.c
index 774986695dc4..19036922f7ef 100644
memory device.
Signed-off-by: David Hildenbrand
---
drivers/dax/kmem.c | 40
1 file changed, 32 insertions(+), 8 deletions(-)
diff --git a/drivers/dax/kmem.c b/drivers/dax/kmem.c
index 99e0f60c4c26..b528f85de845 100644
--- a/drivers/dax/kmem.c
+++ b/drivers
fail acpi_memory_enable_device().
Acked-by: Rafael J. Wysocki
Signed-off-by: David Hildenbrand
---
drivers/acpi/acpi_memhotplug.c | 35 +-
1 file changed, 30 insertions(+), 5 deletions(-)
diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi
smart auto-online decision for individual memory blocks within a
memory group based on group statistics.
Signed-off-by: David Hildenbrand
---
drivers/base/memory.c | 10 +-
include/linux/memory.h | 4
include/linux/memory_hotplug.h | 13 +
mm
We want a single unit to be of the same type.
For now, memory groups are an internal concept that is not exposed to
user space; we might want to change that in the future, though.
add_memory() users can specify a mgid instead of a nid when passing
the MHP_NID_IS_MGID flag.
Signed-off-by: David
en enabling
the new "auto-movable" policy, though.
* memory_hotplug.auto_movable_numa_aware considers numa node stats in
addition to global stats, and defaults to "true".
Note: just like the old policy, the new policy won't take things like
unmovable huge pages or memo
only online/offline complete (individual)
memory blocks.
Signed-off-by: David Hildenbrand
---
drivers/base/memory.c | 14 +++---
include/linux/memory_hotplug.h | 2 +-
include/linux/mmzone.h | 7 +++
mm/memory_hotplug.c| 14 +++---
mm/page_alloc.c
dual
Cc: Dave Hansen
Cc: Vlastimil Babka
Cc: Mike Rapoport
Cc: "Rafael J. Wysocki"
Cc: Len Brown
Cc: Pavel Tatashin
Cc: Greg Kroah-Hartman
Cc: virtualization@lists.linux-foundation.org
Cc: linux...@kvack.org
Cc: linux-a...@vger.kernel.org
[1] https://lkml.kernel.org/r/20210707073
On 16.07.21 14:53, David Hildenbrand wrote:
On 16.07.21 14:46, tianxianting wrote:
Do you interest in this patch? just little improvment:)
I am, especially when I'm cc'ed and aware of it ;)
Sorry, just found it in my gmail spam folder ... WTH. Why does the
original one get filtered
On 16.07.21 14:46, tianxianting wrote:
Do you interest in this patch? just little improvment:)
I am, especially when I'm cc'ed and aware of it ;)
Reviewed-by: David Hildenbrand
One nit below
在 2021/7/13 下午11:38, Xianting Tian 写道:
From: Xianting Tian
Use the helper virtio_find_vqs
On 14.07.21 22:13, Heiko Carstens wrote:
On Mon, Jul 12, 2021 at 02:40:49PM +0200, David Hildenbrand wrote:
Checkpatch complained on a follow-up patch that we are using "unsigned"
here, which defaults to "unsigned int" and checkpatch is correct.
Use "unsigned lon
We allocate + initialize everything from scratch. In case enabling the
device fails, we free all memory resourcs.
Acked-by: Rafael J. Wysocki
Cc: Len Brown
Cc: linux-a...@vger.kernel.org
Signed-off-by: David Hildenbrand
---
drivers/acpi/acpi_memhotplug.c | 4
1 file changed, 4 deletions
shal Verma
Cc: Dave Jiang
Cc: "Michael S. Tsirkin"
Cc: Jason Wang
Cc: Andrew Morton
Cc: Nathan Lynch
Cc: Laurent Dufour
Cc: "Aneesh Kumar K.V"
Cc: Scott Cheloha
Cc: Anton Blanchard
Cc: linuxppc-...@lists.ozlabs.org
Cc: linux-a...@vger.kernel.org
Cc: nvd...@lists.li
sts.infradead.org
Cc: linux-i...@vger.kernel.org
Cc: linuxppc-...@lists.ozlabs.org
Cc: linux-s...@vger.kernel.org
Cc: linux...@vger.kernel.org
Signed-off-by: David Hildenbrand
---
arch/arm64/mm/mmu.c| 3 +--
arch/ia64/mm/init.c| 3 +--
arch/powerpc/mm/mem.c | 3 +--
es in the range of
multiple TB.
Fixes: e5e689302633 ("mm, memory_hotplug: display allowed zones in the
preferred ordering")
Signed-off-by: David Hildenbrand
---
include/linux/memory_hotplug.h | 4 ++--
mm/memory_hotplug.c| 4 ++--
2 files changed, 4 insertions(+), 4
ansen
Cc: Vlastimil Babka
Cc: Mike Rapoport
Cc: "Rafael J. Wysocki"
Cc: Len Brown
Cc: Pavel Tatashin
Cc: Heiko Carstens
Cc: Michael Ellerman
Cc: Catalin Marinas
Cc: virtualization@lists.linux-foundation.org
Cc: linux...@kvack.org
Cc: linux-a...@vger.kernel.org
David Hildenbrand
101 - 200 of 827 matches
Mail list logo