On Wed 05-09-18 18:59:23, Mike Rapoport wrote:
> The functions are equivalent, just the later does not require nobootmem
> translation layer.
>
> Signed-off-by: Mike Rapoport
Acked-by: Michal Hocko
> ---
> arch/x86/xen/p2m.c | 2 +-
> 1 file changed, 1 insertion(+), 1
On Wed 05-09-18 18:59:24, Mike Rapoport wrote:
> The functions are equivalent, just the later does not require nobootmem
> translation layer.
>
> Signed-off-by: Mike Rapoport
modulo @memblock_alloc_low@@memblock_virt_alloc_low@
Acked-by: Michal Hocko
> ---
> arch/x86/k
ode if the given one doesn't have a
proper range. So good. Lack of proper documentation didn't really help.
> Signed-off-by: Mike Rapoport
Acked-by: Michal Hocko
> ---
> arch/x86/kernel/setup_percpu.c | 6 --
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
deep down the
callpath to see they are doing the same thing essentially.
> Signed-off-by: Mike Rapoport
Acked-by: Michal Hocko
> ---
> drivers/usb/early/xhci-dbc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/early/xhci-dbc.c b/d
On Wed 05-09-18 18:59:27, Mike Rapoport wrote:
> The alloc_bootmem_low(size) allocates low memory with default alignement
> and can be replcaed by memblock_alloc_low(size, 0)
>
> Signed-off-by: Mike Rapoport
Again _virt renaming thing...
Acked-by: Michal Hocko
> ---
>
On Wed 05-09-18 18:59:28, Mike Rapoport wrote:
> Signed-off-by: Mike Rapoport
The translation is simpler here but still a word or two would be nice.
Empty changelogs suck.
To the change
Acked-by: Michal Hocko
> ---
> arch/arc/kernel/unwind.c | 4 ++--
> arch/x86/kernel/se
vailable())
> section = kzalloc_node(array_size, GFP_KERNEL, nid);
> else
> - section = memblock_alloc_node(array_size, nid);
> + section = memblock_alloc_node(array_size, 0, nid);
>
> return section;
> }
> --
> 2.7.4
>
--
Michal Hocko
SUSE Labs
On Wed 05-09-18 18:59:30, Mike Rapoport wrote:
> Signed-off-by: Mike Rapoport
again a short work of wisdom please.
The change itself looks good.
Acked-by: Michal Hocko
> ---
> arch/ia64/mm/init.c | 8
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --
On Thu 06-09-18 09:30:23, Michal Hocko wrote:
> Is there any reason to keep
>
> ifdef CONFIG_NO_BOOTMEM
> obj-y += nobootmem.o
> else
> obj-y += bootmem.o
> endif
>
> behind?
I can see you have done so in an earlier patch. I have mi
On Wed 05-09-18 18:59:31, Mike Rapoport wrote:
> Use memblock_alloc_try_nid whenever goal (i.e. mininal address is
> specified) and memblock_alloc_node otherwise.
I suspect you wanted to say (i.e. minimal address) is specified
> Signed-off-by: Mike Rapoport
Acked-by: Michal Hocko
On Wed 05-09-18 18:59:32, Mike Rapoport wrote:
> Signed-off-by: Mike Rapoport
ENOCHAGELOG again
The conversion itself looks good to me
Acked-by: Michal Hocko
> ---
> arch/alpha/kernel/pci_iommu.c | 4 ++--
> arch/ia64/sn/kernel/io_common.c | 7 ++-
> arch/ia64/sn/kernel/
do the right thing and from a quick glance
it looks sane (modulo _virt naming)
Acked-by: Michal Hocko
> ---
> arch/arc/mm/highmem.c| 2 +-
> arch/m68k/atari/stram.c | 3 ++-
> arch/m68k/mm/motorola.c | 5 +++--
> arch/mips/cavium-o
On Wed 05-09-18 18:59:34, Mike Rapoport wrote:
> The conversion is done using the following semantic patch:
>
> @@
> expression e;
> @@
> - alloc_bootmem_pages(e)
> + memblock_alloc(e, PAGE_SIZE)
>
> Signed-off-by: Mike Rapoport
Same as the previous pa
MP_CACHE_BYTES, 0UL);
> + ctx_list_pool = memblock_alloc_from(size, SMP_CACHE_BYTES, 0UL);
>
> for (ctx = 0; ctx < numctx; ctx++) {
> struct ctx_list *clist;
> diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h
> index 3896af2..c97c105 100644
> --- a/include/linux/bootmem.h
> +++ b/include/linux/bootmem.h
> @@ -122,6 +122,14 @@ static inline void * __init memblock_alloc_raw(
> NUMA_NO_NODE);
> }
>
> +static inline void * __init memblock_alloc_from(
> + phys_addr_t size, phys_addr_t align, phys_addr_t min_addr)
> +{
> + return memblock_alloc_try_nid(size, align, min_addr,
> + BOOTMEM_ALLOC_ACCESSIBLE,
> + NUMA_NO_NODE);
> +}
> +
> static inline void * __init memblock_alloc_nopanic(
> phys_addr_t size, phys_addr_t align)
> {
> --
> 2.7.4
>
--
Michal Hocko
SUSE Labs
0);
> int i;
>
> cmdline[0] = 0;
> diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c
> index e8ae2e5..332fcca 100644
> --- a/drivers/macintosh/smu.c
> +++ b/drivers/macintosh/smu.c
> @@ -493,7 +493,7 @@ int __init smu_init (void)
> goto fail_np;
> }
>
> - smu = alloc_bootmem(sizeof(struct smu_device));
> + smu = memblock_alloc(sizeof(struct smu_device), 0);
>
> spin_lock_init(&smu->lock);
> INIT_LIST_HEAD(&smu->cmd_list);
> diff --git a/init/main.c b/init/main.c
> index d0b92bd..99a9e99 100644
> --- a/init/main.c
> +++ b/init/main.c
> @@ -768,8 +768,8 @@ static int __init initcall_blacklist(char *str)
> str_entry = strsep(&str, ",");
> if (str_entry) {
> pr_debug("blacklisting initcall %s\n", str_entry);
> - entry = alloc_bootmem(sizeof(*entry));
> - entry->buf = alloc_bootmem(strlen(str_entry) + 1);
> + entry = memblock_alloc(sizeof(*entry), 0);
> + entry->buf = memblock_alloc(strlen(str_entry) + 1, 0);
> strcpy(entry->buf, str_entry);
> list_add(&entry->next, &blacklisted_initcalls);
> }
> --
> 2.7.4
>
--
Michal Hocko
SUSE Labs
On Wed 05-09-18 18:59:37, Mike Rapoport wrote:
> The bootmem compatibility APIs are not used and can be removed.
>
> Signed-off-by: Mike Rapoport
I am happy to see this finally go
Acked-by: Michal Hocko
> ---
> include/linux/bootmem.h | 47 --
> mm/nobootme
> - free_bootmem(e1, e2)
> + memblock_free(e1, e2)
> |
> - free_bootmem_node(e1, e2, e3)
> + memblock_free(e2, e3)
> )
>
> Signed-off-by: Mike Rapoport
Acked-by: Michal Hocko
> ---
> arch/alpha/kernel/core_irongate.c | 3 +--
> arch/arm64/mm/init.c | 2 +-
>
bootmem variant.
>
> Signed-off-by: Mike Rapoport
Acked-by: Michal Hocko
> ---
> arch/sparc/kernel/mdesc.c | 3 ++-
> arch/x86/platform/efi/quirks.c | 6 +++---
> drivers/firmware/efi/apple-properties.c | 2 +-
> include/linux/bootmem.h
On Wed 05-09-18 18:59:40, Mike Rapoport wrote:
> The conversion is done using
>
> sed -i 's@free_all_bootmem@memblock_free_all@' \
> $(git grep -l free_all_bootmem)
>
> Signed-off-by: Mike Rapoport
Acked-by: Michal Hocko
--
Michal Hocko
SUSE Labs
On Wed 05-09-18 18:59:41, Mike Rapoport wrote:
> The conversion is done using
>
> sed -i 's@__free_pages_bootmem@memblock_free_pages@' \
> $(git grep -l __free_pages_bootmem)
>
> Signed-off-by: Mike Rapoport
Acked-by: Michal Hocko
> ---
> mm/internal
On Wed 05-09-18 18:59:42, Mike Rapoport wrote:
> Move a few remaining functions from nobootmem.c to memblock.c and remove
> nobootmem
>
> Signed-off-by: Mike Rapoport
Acked-by: Michal Hocko
> ---
> mm/Makefile| 1 -
>
On Wed 05-09-18 18:59:43, Mike Rapoport wrote:
> Drop BOOTMEM_ALLOC_ACCESSIBLE and BOOTMEM_ALLOC_ANYWHERE in favor of
> identical MEMBLOCK definitions.
>
> Signed-off-by: Mike Rapoport
Acked-by: Michal Hocko
> ---
> arch/ia64/mm/discontig.c | 2 +-
> arch/powerpc/
this. I wish we
could simplify the memblock API as well. There are just too many public
functions with subtly different semantic and barely any useful
documentation.
But even this is a great step forward!
--
Michal Hocko
SUSE Labs
use?
--
Michal Hocko
SUSE Labs
On Thu 06-09-18 14:31:11, Michal Hocko wrote:
> On Thu 06-09-18 11:13:39, Aneesh Kumar K.V wrote:
> > We want to use this to support customized huge page migration.
>
> Please be much more specific. Ideally including the user. Btw. why do
> you want to skip the hugetlb poo
tter describe why you are
bypassing hugetlb pools. I assume that the reason is to guarantee a
forward progress because those might be sitting in the CMA pools
already, right?
--
Michal Hocko
SUSE Labs
MA/ZONE_MOVABLE pages. Pinned pages are not reclaimable as
well so there is a risk of OOMs if there are too many of them. We have
discussed approaches that would allow to force pin invalidation/revocation
at LSF/MM. Isn't that a more appropriate solution to the problem you are
seeing?
--
Michal Hocko
SUSE Labs
On Thu 06-09-18 15:43:21, Mike Rapoport wrote:
> On Thu, Sep 06, 2018 at 09:28:00AM +0200, Michal Hocko wrote:
> > On Wed 05-09-18 20:20:18, Mike Rapoport wrote:
> > > On Wed, Sep 05, 2018 at 12:04:36PM -0500, Rob Herring wrote:
> > > > On Wed, Sep 5, 2018 at 11:00 AM
On Thu 06-09-18 16:39:58, Mike Rapoport wrote:
> On Thu, Sep 06, 2018 at 03:01:02PM +0200, Michal Hocko wrote:
> > On Thu 06-09-18 15:43:21, Mike Rapoport wrote:
> > > On Thu, Sep 06, 2018 at 09:28:00AM +0200, Michal Hocko wrote:
> > > > On Wed 05-09-18 20:20:18, Mik
On Fri 07-09-18 11:42:12, Mike Rapoport wrote:
> On Thu, Sep 06, 2018 at 03:46:27PM +0200, Michal Hocko wrote:
> > On Thu 06-09-18 16:39:58, Mike Rapoport wrote:
> > > On Thu, Sep 06, 2018 at 03:01:02PM +0200, Michal Hocko wrote:
> > > > On Thu 06-09-18 15:43:21, Mik
On Thu 06-09-18 19:00:43, Aneesh Kumar K.V wrote:
> On 09/06/2018 06:23 PM, Michal Hocko wrote:
> > On Thu 06-09-18 11:13:42, Aneesh Kumar K.V wrote:
> > > Current code doesn't do page migration if the page allocated is a
> > > compound page.
> > > With
On Fri 07-09-18 16:45:09, Aneesh Kumar K.V wrote:
> On 09/07/2018 02:33 PM, Michal Hocko wrote:
> > On Thu 06-09-18 19:00:43, Aneesh Kumar K.V wrote:
> > > On 09/06/2018 06:23 PM, Michal Hocko wrote:
> > > > On Thu 06-09-18 11:13:42, Aneesh Kumar K.V wrote:
> >
g that I've seen a patch to address
that. It would be great to have it folded to this one.
> Signed-off-by: Mike Rapoport
Acked-by: Michal Hocko
--
Michal Hocko
SUSE Labs
Acked-by: Michal Hocko
--
Michal Hocko
SUSE Labs
On Fri 14-09-18 15:10:20, Mike Rapoport wrote:
> Several bootmem functions and macros are not used. Remove them.
>
> Signed-off-by: Mike Rapoport
Acked-by: Michal Hocko
--
Michal Hocko
SUSE Labs
by this change. It is
unnecessary churn. So if nothing else just add a note _why_ you think
this is better.
--
Michal Hocko
SUSE Labs
if (slab_is_available())
> section = kzalloc_node(array_size, GFP_KERNEL, nid);
> else
> - section = memblock_alloc_node(array_size, nid);
> + section = memblock_alloc_node(array_size, 0, nid);
>
> return section;
> }
> --
> 2.7.4
>
--
Michal Hocko
SUSE Labs
On Wed 26-09-18 11:31:27, Michal Hocko wrote:
> On Fri 14-09-18 15:10:29, Mike Rapoport wrote:
> > With the align parameter memblock_alloc_node() can be used as drop in
> > replacement for alloc_bootmem_pages_node() and __alloc_bootmem_node(),
> > which is done in the follow
On Fri 14-09-18 15:10:31, Mike Rapoport wrote:
> Use memblock_alloc_try_nid whenever goal (i.e. minimal address is
> specified) and memblock_alloc_node otherwise.
>
> Signed-off-by: Mike Rapoport
Acked-by: Michal Hocko
--
Michal Hocko
SUSE Labs
f (new == NULL) {
> pr_err("Alloc_bootmem failed\n");
> return 1;
> diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c
> index e8ae2e5..332fcca 100644
> --- a/drivers/macintosh/smu.c
> +++ b/drivers/macintosh/smu.c
> @@ -493,7 +493,7 @@ int __init smu_init (void)
> goto fail_np;
> }
>
> - smu = alloc_bootmem(sizeof(struct smu_device));
> + smu = memblock_alloc(sizeof(struct smu_device), 0);
>
> spin_lock_init(&smu->lock);
> INIT_LIST_HEAD(&smu->cmd_list);
> diff --git a/init/main.c b/init/main.c
> index d0b92bd..99a9e99 100644
> --- a/init/main.c
> +++ b/init/main.c
> @@ -768,8 +768,8 @@ static int __init initcall_blacklist(char *str)
> str_entry = strsep(&str, ",");
> if (str_entry) {
> pr_debug("blacklisting initcall %s\n", str_entry);
> - entry = alloc_bootmem(sizeof(*entry));
> - entry->buf = alloc_bootmem(strlen(str_entry) + 1);
> + entry = memblock_alloc(sizeof(*entry), 0);
> + entry->buf = memblock_alloc(strlen(str_entry) + 1, 0);
> strcpy(entry->buf, str_entry);
> list_add(&entry->next, &blacklisted_initcalls);
> }
> --
> 2.7.4
>
--
Michal Hocko
SUSE Labs
l of duplicated '#include
>
> @@
> @@
> - #include
> + #include
>
> Signed-off-by: Mike Rapoport
Acked-by: Michal Hocko
--
Michal Hocko
SUSE Labs
cks from the previous
iteration and there are only minor comments. This looks good overall.
Nice work Mike!
--
Michal Hocko
SUSE Labs
On Wed 26-09-18 16:43:35, Mike Rapoport wrote:
> On Wed, Sep 26, 2018 at 11:36:48AM +0200, Michal Hocko wrote:
> > On Wed 26-09-18 11:31:27, Michal Hocko wrote:
> > > On Fri 14-09-18 15:10:29, Mike Rapoport wrote:
> > > > With the align parameter memblock_alloc
purpose. You said that distributions have hard time to
distinguish different types of onlinining policies but isn't this
something that is inherently usecase specific?
--
Michal Hocko
SUSE Labs
ove_memory simply backs off
silently. Why don't we have to care about memblock resp
dlpar_remove_device_tree_lmb parts? In other words how come the physical
memory range is valid while the node association is not?
--
Michal Hocko
SUSE Labs
On Mon 01-10-18 11:34:25, David Hildenbrand wrote:
> On 01/10/2018 10:40, Michal Hocko wrote:
> > On Fri 28-09-18 17:03:57, David Hildenbrand wrote:
> > [...]
> >
> > I haven't read the patch itself but I just wanted to note one thing
> > about this part
&g
tion of LMBs, but it is not there
> yet, and won't be present in earlier kernels without backporting a
> significant number of changes.
Then the patch you have proposed here just papers over a real issue, no?
IIUC then you simply do not remove the memory if you lose the race.
--
Michal Hocko
SUSE Labs
On Tue 02-10-18 10:14:49, Michael Bringmann wrote:
> On 10/02/2018 09:59 AM, Michal Hocko wrote:
> > On Tue 02-10-18 09:51:40, Michael Bringmann wrote:
> > [...]
> >> When the device-tree affinity attributes have changed for memory,
> >> the 'nid' affinit
On Tue 02-10-18 12:45:50, Tyrel Datwyler wrote:
> On 10/02/2018 11:13 AM, Michael Bringmann wrote:
> >
> >
> > On 10/02/2018 11:04 AM, Michal Hocko wrote:
> >> On Tue 02-10-18 10:14:49, Michael Bringmann wrote:
> >>> On 10/02/2018 09:59 AM, Michal Ho
On Wed 03-10-18 15:38:04, Vitaly Kuznetsov wrote:
> David Hildenbrand writes:
>
> > On 02/10/2018 15:47, Michal Hocko wrote:
> ...
> >>
> >> Why do you need a generic hotplug rule in the first place? Why don't you
> >> simply provide different
On Tue 02-10-18 17:25:19, David Hildenbrand wrote:
> On 02/10/2018 15:47, Michal Hocko wrote:
[...]
> > Zone imbalance is an inherent problem of the highmem zone. It is
> > essentially the highmem zone we all loved so much back in 32b days.
> > Yes the movable zone doesn&
d of days here trying to come up with
> an onlining solution which would work for everyone and eBPF would move
> this decision to distro level.
The point is that there is _no_ general onlining solution. This is
basically policy which belongs to the userspace.
--
Michal Hocko
SUSE Labs
ree that allocating that from the zone normal and off node
is not great. Especially the second part which is noticeable for whole
node hotplug.
I have a feeling that arguing about fork not able to proceed or OOMing
for the memory hotplug is a bit of a stretch and a sign a of
misconfiguration.
--
Michal Hocko
SUSE Labs
g to enable
them anyway (e.g. RAS would require to have movable_node kernel
parameters, ballooning a kernel module etc.).
Really, one udev script to rule them all will simply never work.
--
Michal Hocko
SUSE Labs
ic(size, 0)
> + memblock_alloc_low_nopanic(size, SMP_CACHE_BYTES)
> |
> - memblock_alloc_from_nopanic(size, 0, min_addr)
> + memblock_alloc_from_nopanic(size, SMP_CACHE_BYTES, min_addr)
> |
> - memblock_alloc_node(size, 0, nid)
> + memblock_alloc_node(size, SMP_CACHE_BYTES, nid)
> )
>
s hard to review manually.
--
Michal Hocko
SUSE Labs
served users before we can do so for device memory?
I am all for removing relicts because they just confuse people but I
fail to see any relation here.
--
Michal Hocko
SUSE Labs
sor. And that is independent from
> PG_reserved.
>
> Cc: Andrew Morton
> Cc: Stephen Rothwell
> Cc: Pavel Tatashin
> Cc: Michal Hocko
> Cc: Alexander Duyck
> Cc: Matthew Wilcox
> Cc: Anthony Yznaga
> Cc: Miles Chen
> Cc: yi.z.zh...@linux.intel.com
> Cc: Dan
#endif
>
> -#ifdef CONFIG_NODES_SPAN_OTHER_NODES
> +#ifdef CONFIG_NUMA
> /* Only safe to use early in boot when initialisation is single-threaded */
> static inline bool __meminit early_pfn_in_nid(unsigned long pfn, int node)
> {
> --
> 2.7.4
>
--
Michal Hocko
SUSE Labs
On Thu 02-05-19 09:00:31, Michal Hocko wrote:
> On Wed 01-05-19 15:12:32, Barret Rhoden wrote:
> [...]
> > A more elegant solution may be to avoid registering with sysfs during early
> > boot, or something else entirely. But I figured I'd ask for help at this
> > p
rovide an unaligned address
and even if it did then rounding that to a pfn doesn't sound like a
terrible thing to do. Anyway this removes few lines so why not.
>
> Cc: Andrew Morton
> Cc: Oscar Salvador
> Cc: Michal Hocko
> Cc: David Hildenbrand
> Cc: Pavel Tatashin
> Cc: Q
e the case for other arches which support hotplug. I do not see
much point in adding warning to each of them.
> Cc: Martin Schwidefsky
> Cc: Heiko Carstens
> Cc: Andrew Morton
> Cc: Michal Hocko
> Cc: Mike Rapoport
> Cc: David Hildenbrand
> Cc: Vasily Gorbik
> Cc: Oscar
hwidefsky
> Cc: Heiko Carstens
> Cc: Andrew Morton
> Cc: Michal Hocko
> Cc: Mike Rapoport
> Cc: David Hildenbrand
> Cc: Vasily Gorbik
> Cc: Oscar Salvador
> Signed-off-by: David Hildenbrand
> ---
> arch/s390/mm/init.c | 13 +++--
> 1 file changed,
On Mon 27-05-19 13:11:46, David Hildenbrand wrote:
> We'll rework hotplug_memory_register() shortly, so it no longer consumes
> pass a section.
>
> Cc: Greg Kroah-Hartman
> Cc: "Rafael J. Wysocki"
> Signed-off-by: David Hildenbrand
Acked-by: Michal Hocko
&g
Yoshinori Sato
> Cc: Rich Felker
> Cc: Dave Hansen
> Cc: Andy Lutomirski
> Cc: Peter Zijlstra
> Cc: Thomas Gleixner
> Cc: Ingo Molnar
> Cc: Borislav Petkov
> Cc: "H. Peter Anvin"
> Cc: Greg Kroah-Hartman
> Cc: "Rafael J. Wysocki"
> Cc:
Use find_memory_block_by_id() in init_memory_block() to catch
> duplicates
>
> Cc: Greg Kroah-Hartman
> Cc: "Rafael J. Wysocki"
> Cc: David Hildenbrand
> Cc: "mike.tra...@hpe.com"
> Cc: Andrew Morton
> Cc: Ingo Molnar
> Cc: Andrew Banman
>
On Mon 27-05-19 13:11:49, David Hildenbrand wrote:
> No longer needed, the callers of arch_add_memory() can handle this
> manually.
>
> Cc: Andrew Morton
> Cc: David Hildenbrand
> Cc: Michal Hocko
> Cc: Oscar Salvador
> Cc: Pavel Tatashin
> Cc: Wei Yang
> C
ot;mike.tra...@hpe.com"
> Cc: Andrew Morton
> Cc: Andrew Banman
> Cc: Ingo Molnar
> Cc: Alex Deucher
> Cc: "David S. Miller"
> Cc: Mark Brown
> Cc: Chris Wilson
> Cc: Oscar Salvador
> Cc: Jonathan Cameron
> Cc: Michal Hocko
> Cc: Pavel Tatashi
Hildenbrand
> Cc: Oscar Salvador
> Cc: Andrew Morton
> Cc: Jonathan Cameron
> Signed-off-by: David Hildenbrand
Anyway
Acked-by: Michal Hocko
> ---
> drivers/base/node.c | 18 +-
> include/linux/node.h | 5 ++---
> 2 files changed, 7 insertions(+)
vid Hildenbrand
Acked-by: Michal Hocko
> ---
> include/linux/memory_hotplug.h | 2 +-
> mm/memory_hotplug.c| 2 +-
> mm/sparse.c| 4 ++--
> 3 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/include/linux/memory_hotplu
On Mon 01-07-19 11:36:44, Oscar Salvador wrote:
> On Mon, Jul 01, 2019 at 10:51:44AM +0200, Michal Hocko wrote:
> > Yeah, we do not allow to offline multi zone (node) ranges so the current
> > code seems to be over engineered.
> >
> > Anyway, I am wondering why do we
On Mon 01-07-19 09:43:06, Michal Hocko wrote:
> On Mon 27-05-19 13:11:43, David Hildenbrand wrote:
> > ZONE_DEVICE is not yet supported, fail if an altmap is passed, so we
> > don't forget arch_add_memory()/arch_remove_memory() when unlocking
> > support.
>
> Why d
On Mon 01-07-19 09:45:03, Michal Hocko wrote:
> On Mon 27-05-19 13:11:44, David Hildenbrand wrote:
> > Will come in handy when wanting to handle errors after
> > arch_add_memory().
>
> I do not understand this. Why do you add a code for something that is
> not possible
anup page tables (also in arch_add_memory() in case
> + * adding fails). Until then, this function should only be used
> + * during memory hotplug (adding memory), not for memory
> + * unplug. ARCH_ENABLE_MEMORY_HOTREMOVE must not be
> + * unlocked yet.
> + */
> + zone = page_zone(pfn_to_page(start_pfn));
> + __remove_pages(zone, start_pfn, nr_pages, altmap);
> +}
> +#endif
> #endif
> --
> 2.20.1
--
Michal Hocko
SUSE Labs
On Mon 01-07-19 10:01:41, Michal Hocko wrote:
> On Mon 27-05-19 13:11:47, David Hildenbrand wrote:
> > We want to improve error handling while adding memory by allowing
> > to use arch_remove_memory() and __remove_pages() even if
> > CONFIG_MEMORY_HOTREMOVE is not set to e.g.
PAN_OTHER_NODES by default for NUMA to fix this issue.
Yes it can occur on any arch but most sane platforms simply do not
overlap physical ranges. So I do not really see any reason to
unconditionally enable the config for everybody. What is an advantage?
--
Michal Hocko
SUSE Labs
in the first place. Please explain
what motivated you to make this change.
--
Michal Hocko
SUSE Labs
On Fri 12-07-19 15:37:30, Will Deacon wrote:
> Hi all,
>
> On Fri, Jul 12, 2019 at 02:12:23PM +0200, Michal Hocko wrote:
> > On Fri 12-07-19 10:56:47, Hoan Tran OS wrote:
> > [...]
> > > It would be good if we can enable it by-default. Otherwise, let arch
> &g
On Mon 15-07-19 13:10:33, David Hildenbrand wrote:
> On 01.07.19 12:27, Michal Hocko wrote:
> > On Mon 01-07-19 11:36:44, Oscar Salvador wrote:
> >> On Mon, Jul 01, 2019 at 10:51:44AM +0200, Michal Hocko wrote:
> >>> Yeah, we do not allow to offline multi zon
be simpler rather than going half way
to get there. I would have liked the above for the purpose of this patch
more and then go with another one to remove the config altogether. But
Andrew has already sent his patch bomb including this series to Linus so
this is all moot.
--
Michal Hocko
SUSE Labs
On Mon 15-07-19 12:51:27, David Hildenbrand wrote:
> On 01.07.19 14:46, Michal Hocko wrote:
> > On Mon 01-07-19 09:43:06, Michal Hocko wrote:
> >> On Mon 27-05-19 13:11:43, David Hildenbrand wrote:
> >>> ZONE_DEVICE is not yet supported, fail if an altmap is pa
[Sorry for a late reply]
On Mon 15-07-19 17:55:07, Hoan Tran OS wrote:
> Hi,
>
> On 7/12/19 10:00 PM, Michal Hocko wrote:
[...]
> > Hmm, I thought this was selectable. But I am obviously wrong here.
> > Looking more closely, it seems that this is indeed only about
> >
On Wed 31-07-19 09:24:21, Mike Rapoport wrote:
> [ sorry for a late reply too, somehow I missed this thread before ]
>
> On Tue, Jul 30, 2019 at 10:14:15AM +0200, Michal Hocko wrote:
> > [Sorry for a late reply]
> >
> > On Mon 15-07-19 17:55:07, Hoan Tran OS wrote:
>
On Wed 31-07-19 14:14:22, Mike Rapoport wrote:
> On Wed, Jul 31, 2019 at 10:03:09AM +0200, Michal Hocko wrote:
> > On Wed 31-07-19 09:24:21, Mike Rapoport wrote:
> > > [ sorry for a late reply too, somehow I missed this thread before ]
> > >
> > > On Tue, Jul
On Wed 31-07-19 15:26:32, Mike Rapoport wrote:
> On Wed, Jul 31, 2019 at 01:40:16PM +0200, Michal Hocko wrote:
> > On Wed 31-07-19 14:14:22, Mike Rapoport wrote:
> > > On Wed, Jul 31, 2019 at 10:03:09AM +0200, Michal Hocko wrote:
> > > > On Wed 31-07-19
On Wed 31-07-19 17:21:29, Mike Rapoport wrote:
> On Wed, Jul 31, 2019 at 03:00:37PM +0200, Michal Hocko wrote:
> > On Wed 31-07-19 15:26:32, Mike Rapoport wrote:
> > > On Wed, Jul 31, 2019 at 01:40:16PM +0200, Michal Hocko wrote:
> > > > On Wed 31-07-19 14:14:22, Mik
upport for migrating compound pages. The first path adds
> > the helper
> > get_user_pages_cma_migrate() which pin the page making sure we migrate them
> > out of
> > CMA region before incrementing the reference count.
>
> Very little review activity. Perhaps Andrey and/or Michal can find the
> time..
I will unlikely find some time before the end of the year. Sorry about
that.
--
Michal Hocko
SUSE Labs
gfp_zonelist(flags);
> }
No, please don't do this. We do not want to make things work magically
and we definitely do not want to put something like that into the hot
path. We definitely need zonelists to be build transparently for all
possible nodes during the init time.
--
Michal Hocko
SUSE Labs
On Thu 20-12-18 20:26:28, Pingfan Liu wrote:
> On Thu, Dec 20, 2018 at 7:35 PM Michal Hocko wrote:
> >
> > On Thu 20-12-18 17:50:38, Pingfan Liu wrote:
> > [...]
> > > @@ -453,7 +456,12 @@ static inline int gfp_zonelist(gfp_t flags)
> > > */
> > &g
w, I am doing it just like
> > the other types (e.g. online_type) we are using in that context.
> > - The "removable" property should never have been named like that. It
> > should have been "offlinable". Can we still rename that? E.g. boot memory
> > is sometimes marked as removable ...
> >
>
>
> Any feedback regarding the suggested block types would be very much
> appreciated!
I still do not like this much to be honest. I just didn't get to think
through this properly. My fear is that this is conflating an actual API
with the current implementation and as such will cause problems in
future. But I haven't really looked into your patches closely so I might
be wrong. Anyway I won't be able to look into it by the end of year.
--
Michal Hocko
SUSE Labs
expose in generic gfp.h IMHO. It just risks an abuse. I would be looking
at providing asm-generic implementation and reuse it to remove the code
duplication. But I haven't tried that to know that it will work out due
to small/subtle differences between arches.
> Signed-off-by: Anshuman Khand
On Mon 14-01-19 09:30:55, Anshuman Khandual wrote:
>
>
> On 01/13/2019 11:05 PM, Michal Hocko wrote:
> > On Sat 12-01-19 15:56:38, Anshuman Khandual wrote:
> >> All architectures have been defining their own PGALLOC_GFP as (GFP_KERNEL |
> >> __GFP_ZERO) and u
From: Michal Hocko
Pingfan Liu has reported the following splat
[5.772742] BUG: unable to handle kernel paging request at 2088
[5.773618] PGD 0 P4D 0
[5.773618] Oops: [#1] SMP NOPTI
[5.773618] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.20.0-rc1+ #3
[5.773618
On Mon 14-01-19 21:26:39, Michael Ellerman wrote:
> Michal Hocko writes:
>
> > From: Michal Hocko
> >
> > Pingfan Liu has reported the following splat
> > [5.772742] BUG: unable to handle kernel paging request at
> > 2088
> > [5.7
t *pgd)
> @@ -422,7 +420,8 @@ static inline void _pgd_free(pgd_t *pgd)
>
> static inline pgd_t *_pgd_alloc(void)
> {
> - return (pgd_t *)__get_free_pages(PGALLOC_GFP, PGD_ALLOCATION_ORDER);
> + return (pgd_t *)__get_free_pages(GFP_PGTABLE | __GFP_ACCOUNT,
> + PGD_ALLOCATION_ORDER);
> }
>
> static inline void _pgd_free(pgd_t *pgd)
> diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
> index 05e61e6..3d9cde6 100644
> --- a/include/asm-generic/pgtable.h
> +++ b/include/asm-generic/pgtable.h
> @@ -1186,4 +1186,6 @@ static inline bool arch_has_pfn_modify_check(void)
> #define mm_pmd_folded(mm)__is_defined(__PAGETABLE_PMD_FOLDED)
> #endif
>
> +#define GFP_PGTABLE (GFP_KERNEL | __GFP_ZERO)
> +
> #endif /* _ASM_GENERIC_PGTABLE_H */
> diff --git a/virt/kvm/arm/mmu.c b/virt/kvm/arm/mmu.c
> index fbdf3ac..f60a5b8 100644
> --- a/virt/kvm/arm/mmu.c
> +++ b/virt/kvm/arm/mmu.c
> @@ -143,7 +143,7 @@ static int mmu_topup_memory_cache(struct
> kvm_mmu_memory_cache *cache,
> if (cache->nobjs >= min)
> return 0;
> while (cache->nobjs < max) {
> - page = (void *)__get_free_page(PGALLOC_GFP);
> + page = (void *)__get_free_page(GFP_PGTABLE);
> if (!page)
> return -ENOMEM;
> cache->objects[cache->nobjs++] = page;
> --
> 2.7.4
>
--
Michal Hocko
SUSE Labs
On Wed 16-01-19 04:30:18, Matthew Wilcox wrote:
> On Wed, Jan 16, 2019 at 07:57:03AM +0100, Michal Hocko wrote:
> > On Wed 16-01-19 11:51:32, Anshuman Khandual wrote:
> > > All architectures have been defining their own PGALLOC_GFP as (GFP_KERNEL
> > > |
> &g
On Wed 16-01-19 05:18:27, Matthew Wilcox wrote:
> On Wed, Jan 16, 2019 at 06:42:22PM +0530, Anshuman Khandual wrote:
> > On 01/16/2019 06:00 PM, Matthew Wilcox wrote:
> > > On Wed, Jan 16, 2019 at 07:57:03AM +0100, Michal Hocko wrote:
> > >> On Wed 16-01-19 11:
On Wed 16-01-19 18:57:13, Anshuman Khandual wrote:
>
>
> On 01/16/2019 06:14 PM, Michal Hocko wrote:
> > On Wed 16-01-19 04:30:18, Matthew Wilcox wrote:
> >> On Wed, Jan 16, 2019 at 07:57:03AM +0100, Michal Hocko wrote:
> >>> On Wed 16-01-19 11:51:32,
a friendly ping for this. Does anybody see any problem with this
approach?
On Mon 14-01-19 09:24:16, Michal Hocko wrote:
> From: Michal Hocko
>
> Pingfan Liu has reported the following splat
> [5.772742] BUG: unable to handle kernel paging request at 2088
> [
On Thu 24-01-19 19:51:44, Mike Rapoport wrote:
> On Thu, Jan 24, 2019 at 03:17:27PM +0100, Michal Hocko wrote:
> > a friendly ping for this. Does anybody see any problem with this
> > approach?
>
> FWIW, it looks fine to me.
>
> It'd just be nice to have a few m
101 - 200 of 484 matches
Mail list logo